Skip to content
Commit 27ad2b6d authored by mitchelloharawild's avatar mitchelloharawild
Browse files

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.
parent fd23df3e
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment