Git Product home page Git Product logo

seasonal's People

Contributors

andreranza avatar christophsax avatar eddelbuettel avatar homocodens avatar jonlachmann avatar krlmlr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seasonal's Issues

static error

x <- seas(AirPassengers, x11.type = "trend")
static(x, test = F)

transform permanent & temporary fails

# temporary and permanent adjustment
cpi <- ts(runif(250), start = c(1945, 1), frequency = 12)
strike <- ts(runif(250), start = c(1945, 1), frequency = 12)

m <- seas(AirPassengers, 
          transform.xreg = cbind(cpi, strike),
          transform.type = c("temporary", "permanent"),
          transform.function = "log"
          )

warnings in inspect()

in inspect, warnings should be returned immediately and not after quitting the function

plot.revisions

  • different series should be plotted
  • in the revisions save all available output.

xreg should also work in the transform spec

7.18 TRANSFORM

series { data = (879 899 462 670 985 973 ...)
          start = 1967.jan }
transform{data =(1 1.5.75 1 1...) mode = ratio
adjust = lom }

R-code:

# transform
tf <- rnorm(144)

AirPassengers.tf <- AirPassengers * tf
m <- seas(AirPassengers, 
          AirPassengers.tf
)

# transform back
final(m) / tf

history spec numbers are dubious

The history spec leads to questionable figures. The following four models do not greatly differ but history treats them very different. It has something to do with the log, but also with x11/seats. The final series in the x$sae element ist also not identifiable in the mode. Need for inquiry. Delays history spec.

library(seasonal)
m1 <- seas(x = AirPassengers, arima.model = "(0 1 1)(0 1 1)", 
           regression.aictest = NULL, outlier = NULL, 
           transform.function = "log")

m2 <- seas(x = AirPassengers, arima.model = "(0 1 1)(0 1 1)", 
           regression.aictest = NULL, outlier = NULL, 
           transform.function = "none")

m3 <- seas(x = AirPassengers, arima.model = "(0 1 1)(0 1 1)", 
           regression.aictest = NULL, outlier = NULL, 
           transform.function = "log", x11 = list())

m4 <- seas(x = AirPassengers, arima.model = "(0 1 1)(0 1 1)", 
           regression.aictest = NULL, outlier = NULL, 
           transform.function = "none", x11 = list())

r1 <- revisions(m1)
r2 <- revisions(m2)
r3 <- revisions(m3)
r4 <- revisions(m4)

ts.plot(r1$sae, col = c("black", "red"))
ts.plot(r2$sae, col = c("black", "red"))
ts.plot(r3$sae, col = c("black", "red"))
ts.plot(r4$sae, col = c("black", "red"))

texreg issue

texreg S4 method for seasonal is implemented, but it is unclear how a method definition for an outside function should work.

x11regression AND regression

Currently, x11regression and regression are mutually exclusive. That should be changed.

    series{ title = "Automobile Sales"
            file = "carsales.dat"
            start = 1975.Jan }
    transform{ function = log }
    regression{ variables = (const)
                user = (strike80 strike85 strike90)
                file = "strike.dat"
                format = "(3f12.0)" }
    arima{ model = (0 1 1)(0 1 1)12 }
    x11{  title = ("Car Sales in US"
                   "Adjust for strikes in 80, 85, 90")
          save = seasonal appendfcst = yes
          }
    x11regression{   variables = ( td easter[8] )  }

when solved, update wiki

Incomplete SEATS model change warning

This should also show the model:

> seas(AirPassengers, arima.model = c(2, 1, 1, 0, 2, 0))
Warning in seas(AirPassengers, arima.model = c(2, 1, 1, 0, 2, 0)) :
  Model used for SEATS decomposition is different:

summary function

a comprehensive list of useful statistics should be shown

  • Information criterion (AICc and BIC)
  • QS Statistic for seasonality
  • Q Statistic for autocorrelation
  • (Normality statistic)

bimonthly data does not work

probably also affects other non standard freq. needs testing

# bimonthly data
  require(tempdisagg)
  AirPassengersBM <- ta(AirPassengers, to = 6)
  m <- seas(AirPassengersBM, 
       regression.aictest = NULL,
       outlier.types = c("ao", "ls", "tc"),
       forecast.maxlead = 18
  )

final(m) should return bimonthly data

inspect function

model selection

  • avoid NA in selection
  • automatic reestimation as an additional output

graphical outlier deselection?

New plots

  • slidingspan
  • history (delayed due to #5)
  • tidy up (reidual plot and spectra probably not needed)

out in external viewer

  • analyze View() and Edit()
    • is there a way to change the defaults to make View more usable on all platforms?

demo

content of series help with comments should be sufficient

improve help

one help page for plots, one for diagnostical statistics

numeric arima.model spec is incorrect

with numeric model input, the nonseasonal part is used as the seasonal part:

m1 <- seas(AirPassengers, arima.model = c(2, 1, 1, 0, 0, 0))
m2 <- seas(AirPassengers, arima.model = "(2 1 1)(0 0 0)")
identical(spc(m1), spc(m2))

The underlying function as.character.arima is to blame:

> as.character.arima(c(3, 3, 2, 1, 3, 3))
[1] "(3 3 2)(3 3 2)"
> seasonal:::as.character.arima(c(2, 1, 1, 0, 0, 0))
[1] "(2 1 1)(2 1 1)"
> seasonal:::as.character.arima(c(2, 2, 1, 0, 0, 2))
[1] "(2 2 1)(2 2 1)"
> seasonal:::as.character.arima(c(2, 1, 1, 2, 0, 0))
[1] "(2 1 1)(2 1 1)"
> seasonal:::as.character.arima(c(2, 1, 1, 0, 1, 0))
[1] "(2 1 1)(2 1 1)"
> seasonal:::as.character.arima(c(2, 1, 1, 0, 1, 0))
[1] "(2 1 1)(2 1 1)"
> seasonal:::as.character.arima(c(2, 1, 1))
[1] "(2 1 1)"

more flexible arima specification

seas(AirPassengers,
     transform.function = "log",
     arima.model = c(0, 1, 2, 0, 1, 1),
     x11 = list()
)

this should be possible as an alternative to

seas(AirPassengers,
     transform.function = "log",
     arima.model = "(0 1 2)(0 1 1)",
     x11 = list()
)

regressors not shown in x11regression

For an unknown X-13-ARIMA SEATS related reason, the regressors in the x11regression spec do not apperar in the output.

    seas(AirPassengers, 
         x11regression.variables = c("td/1950.1/", "easter[8]", 
                                     "labor[10]", "thank[10]"),
         x11.seasonalma = "x11default",
         x11.sigmalim = c(1.8, 2.9),
         x11.appendfcst = "yes",
         )

when solved, update wiki

help improvements

use of defaults and the dots should be better explained.

otherwise, no change in usage

graphical outlier unselect

perhaps, the identify function could be used to unselect (or perhaps select) outliers in a plot

function

  • applied to a "seas" object
  • calls plot.seas
  • uses identify to get the info from clicks
  • adjust the model
  • reestimate and replots it
  • return static call

generalize series import

rather than explicitly import series from x-13, it would be more flexible to import all produced time series. Like that:

  1. list all time series files produced by X13
  2. import the time series that have been produced (read_series)
  3. the main series probably still need some extra treatment, as they have different names in seats and x11
  4. when saved, it is unclear how the series should be accessed.

support for slidingspan

slidingspans recalls seas with activated slidingspans spec. returns object of class slidingspans.

print.slidingspans shows the output section.
plot.slidingspans gives a nice overview of the 4 (or more) spans. Perhaps also a second panel with max. deviations.

testing routine

set up a testing routine for new releases

  • put all examples in a test file in inst/tests
  • numerical comparison with some outputs (save in data)
  • add x11 tests
  • small function that performs all tests
  • run function on different platforms

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.