weecology / portalPredictions

Using various models to forecast abundances at Portal
MIT License
9 stars 8 forks source link

add seasonal models #252

Closed juniperlsimonis closed 5 years ago

juniperlsimonis commented 6 years ago

given the strong seasonal dynamic in the data, it would be good to include models with seasonal aspects. indeed, it's likely that the wide confidence bounds of some of the predictions are mainly do to not being able to track the seasonal dynamic of the mean density.

as we've discussed before, the sampling cycle doesn't match the seasonal cycle, so seasonal models aren't automatically included in the ESSS algorithms. in addition, the tsglm function doesn't automatically include seasonal models. so, currently none of the models include an explicit seasonal dynamic. however, there is a straightforward way to add seasonality.

a simple way to include a very flexible seasonal form is via a Fourier transform on the fraction of the year of each census date (x1 = cos(2 pi fraction), x2 = sin(2 pi fraction)), which then get included as regressors in the model.

the ets function (used for the ESSS model) does not appear to have the capacity to include regressors, but auto.arima and tsglm both do. that means we could construct seasonal versions of the autoARIMA, nbGARCH, and pevGARCH models, and I imagine we'll see a large increase in predictive power.

my question is then: should we consider adding seasonality to the existing models or should we retain the existing models without seasonality and then add companion models ("autoARIMAseas" or something like that) that have the same structure with seasonality added?

ethanwhite commented 6 years ago

I don't have overly strong opinions on this, but I guess I lean towards new models since it's incorporate something that the original models didn't envision. In addition to @gmyenni's thoughts I'd be curious to hear from @skmorgane as well.

skmorgane commented 6 years ago

I agree with @ethanwhite. I like the idea of new models. In general I like the idea of keeping simplistic models running "as-is" as both documenting what we've already tried ('yea, been there done that, check model X') and because it would be easier for classes, presentations, etc to show side-by-side comparisons of model improvement if the old version and the new version are both continuing to forecast.

gmyenni commented 6 years ago

Yeah, I could see an argument for either way. But I'm good with the idea of new models. Especially since the 'baseline' models could end up being the only ones that don't account for seasonality in some way.

juniperlsimonis commented 6 years ago

ok, seems like we're all pretty much in agreement here on this. i'll start building these shortly.

juniperlsimonis commented 5 years ago

good base seasonal model included as nbsGARCH in https://github.com/weecology/portalcasting/releases/tag/v0.5.0