[R] GLM and Autocorrelation

2012-07-25 Thread MRB305
I am looking for a way to correct for autocorrelation using for my GLM models. I can identify the degree of autocorrelation, using PACF, but cannot figure out a way to specify which variables are the ones that are autocorrelated, and how to correct for this. Thank you for any help! -- View this

[R] Times Series Data using GLS

2012-07-10 Thread MRB305
I am trying to use regression to determine the interaction between a couple of variables while correcting for autocorrelation. Thus far, I have created the code: model <- gls(yvar~xvar1*xvar2, correlation = corARMA (p=2), method = "ML", data = data) I'm having a difficult time understanding the di