tslm functional response variables
tslm() now supports using functions as the response variable. ```R lm(fourier(USAccDeaths, 1) ~ USAccDeaths) tslm(ts(fourier(USAccDeaths, 1)) ~ USAccDeaths) tslm(ts(fourier(USAccDeaths, 1)) ~ USAccDeaths + trend) tslm(ts(fourier(USAccDeaths, 1), frequency = 12) ~ USAccDeaths + trend + season) ``` It should continue to work with forecast.lm() ```R fit <- tslm(ts(rnorm(36),frequency = 4) ~ trend + season) forecast(fit) ``` Some code in tslm() has also been tidied.
Loading
Please sign in to comment