Re: [R] AR1 in gls function

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Fri 15 Apr 2005 - 17:50:09 EST

On Fri, 15 Apr 2005, Prodromos Zanis wrote:

> 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?

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.

-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Fri Apr 15 18:02:23 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:31:11 EST