Skip to content
Prev 12456 / 20628 Next

Within group estimate of autocorrelation

On 14-09-22 02:39 PM, PATRICK, Samantha wrote:
However I want to have an estimate of the autocorrelation for each
  individual.  I have checked but can not find any code to extract
  this value.

The model assumes that autocorrelation structure is homogeneous
across individuals.
So, the answer is: no/correct.
use the weights function to group individuals.
suggestions!


Perhaps just use acf() along with your favourite by-group tool
in R (plyr, aggregate, dplyr, data.table, for loop ...)
to compute/extract the first-order autocorrelation parameter for each
individual?  Or you could use

gls(Response~1,correlation=corAR1(form~time),...)

for each individual and similarly return the autocorrelation parameter
per individual.

  I hope you have a reasonably large number of observations per
individual ...