[R] gls

Uwe Ligges ligges at statistik.uni-dortmund.de
Thu Dec 27 22:21:32 CET 2001

Dave Thompson wrote:
> A couple of questions:
> How to be sure that gls allowes errors to be correlated and/or have
> unequal variances?  (is this on auto or is there a switch?)

It's in the help of ?gls (package nlme), details in the description of
the arguments "correlation" and "weights":

        an optional corStruct object describing the within-group
structure. See the documentation of corClasses for a description of the
available corStruct classes. If a grouping variable is to be used, it
must be specified in the form argument to the corStruct constructor.
Defaults to NULL, corresponding to uncorrelated errors. 

        an optional varFunc object or one-sided formula describing the
within-group heteroscedasticity structure. If given as a formula, it is
used as the argument to varFixed, corresponding to fixed variance
weights. See the documentation on varClasses for a description of the
available varFunc classes. Defaults to NULL, corresponding to
homoscesdatic errors. 

> How to calculate confidence limits for a linear regresssion?

You might want to use predict(.... , interval="confidence"), see

Uwe Ligges
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list