[R-sig-ME] question about gls in nlme

Thierry Onkelinx thierry.onkelinx at inbo.be
Thu May 7 10:12:29 CEST 2015


Dear Mark,

It depends on which residuals you extract from the model. See the type
argument of residuals.gls()

Best regards,

ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to say
what the experiment died of. ~ Sir Ronald Aylmer Fisher
The plural of anecdote is not data. ~ Roger Brinner
The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of data.
~ John Tukey

2015-05-06 19:57 GMT+02:00 Mark Leeds <markleeds2 op gmail.com>:

> Hi: I've looked around for a long while and I can't figure out something
> about
> the gls function in the nlme package. If someone wouldn't mind explaining
> it or knows of a good reference ( I have pinheiro and bates but it's 10
> states away because I lent it to someone ) that explains the following,
> that would be fine also.
>
> Suppose I am estimating a  2 predictor regression model with AR(1) errors.
>
> So, the mode isl y_t = B_0 + B_1*x_t + B2*y_2 +  u_t         t = 1,..... T
>
> where u_t =  phi*u_t-1 + epsilon_t
>
> where var(epsilon_t) is sigma^2.
>
> My first question is:
>
> When one runs the function gls, I can't tell what the residuals represent.
> In other words, are they
>
> A) the residuals associated with the transformed regression where the error
> term is epsilon_t  with variance(sigma^2).
>
> or
>
> B) the residuals associated with the untransformed model written above
> so with covariance matrix V and elements V_ij =   phi^(|j-i| * sigma^2 /
> (1-phi^2).
>
> My second question is:
>
> Whether  the result represents A or B, is there a way to use a gls related
>  function to convert back and forth between the two  ? Thanks a lot for any
> wisdom references etc. I've looked all over and can't find much related to
> my question.
>
> The other possible  option is to consider using the systemfit package but I
> have a feeling there must be a way to do this using gls.
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-mixed-models op r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
>

	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list