robjhyndman / forecast

Forecasting Functions for Time Series and Linear Models
http://pkg.robjhyndman.com/forecast
1.13k stars 342 forks source link

Accuracy for stlm objects #252

Closed dashaub closed 8 years ago

dashaub commented 8 years ago

The accuracy() method is not currently supported for stlm objects. This will require the modification of the if statement as we did with nnetar objects, but there is an additional twist. The getResponse() (default) method already works, but fitted(nnetar(wineind)) does not. While we are at it we might as well support residuals(nnetar(wineind) as well.

What would you think modifying stlm() so we store the fitted and/or residuals in the stlm object like in tbats/bats/nnetar/ets objects? That should make extracting the fitted/residuals very easy and quick.

robjhyndman commented 8 years ago

Fixed in https://github.com/robjhyndman/forecast/commit/8b33ba3da20fcf96bdaeee97e09281a811d98b2a and https://github.com/robjhyndman/forecast/commit/ed02d98863f4e1e6d39651cb57e210ba1d28b6e4

fitted(nnetar(wineind)) and residuals(nnetar(wineined)) both already work.

dashaub commented 8 years ago

Correction, I meant fitted(stlm(wineind)) and residuals(stlm(wineind)). Thinking about the other nnetar issues muddled this.