Skip to content

AR1 in gls function

2 messages · Prodromos Zanis, Brian Ripley

#
Dear R-project users

I would like to calculate a linear trend versus time taking into account a
first order autoregressive process of a single time series (e.g. data$S80
in the following example) using th gls function.

gls(S80 ~ tt,data=data,corAR1(value, form, fixed))

My question is what number to set in the position of value within corAR1?
Should it be the acf at lag 1?

I look forward for your reply

With kind regards

Prodromos Zanis
#
On Fri, 15 Apr 2005, Prodromos Zanis wrote:

            
The initial value for the AR(1) parameter.  acf can mean autocovariance or 
autocorrelation: the value of the latter is a good starting point.
However, unless you have very high correlation (or are fixing the 
parameter), value=0 will usually work.