[R-sig-ME] Variable selection for a time-series.
Alex Bokov
alex.bokov at gmail.com
Thu Jun 2 00:13:44 CEST 2011
If I'm fitting a time-series model, for example...
lme(y ~ time + I(time^2) + ... + I(time^n) + x1 + x2 + x3,
random=~time|id, data=mydata, method='LM')
...where x1,x2,x3 are covariates that may or may not be important to
the model, and 'id' is a factor for grouping all the responses
collected from the same subject.
1) Can I rely on stepAIC() to add relevant interactions involving time
and toss out irrelevant time-terms, just like any other covariates?
2) Should I first do variable selection with stepAIC() and then
manually add terms to the random formula, or the other way around?
3) If I add autocorrelation to the model, for example corExp(), should
I give it the same formula as I used for the random effects?
4) After adding autocorrelation, is it necessary to again test the
effect of each existing term to make sure they are still needed by the
model?
Thanks.
More information about the R-sig-mixed-models
mailing list