[R] About function 'gnls'

HoiNam hiebsra at hotmail.com
Wed Feb 9 08:29:59 CET 2000

Dear all,

  I'm currently using R v0.90.0 with packages "nlme" on Windows 98 Second Edition. I have an enquiry on using the generalised least squares function 'gnls'.

  My data set "lx.sea" contains some seasonal GDP with some independent variables. I want to fit a nonlinear least square using restricted maximum likelihood estimation. There exists a AR(4) correlation structure (only the 4th AR) in the error term. So I enter the following commands:

> gnls(ldgdp~+pc2+pc3+pc4+pc5+pc7+t,data=lx.sea,correlation=corARMA(p=4,q=0))

It results not only the 4th AR but also the first 3 order AR in the equation. So how can I fit my model with only the 4th AR?? Are there any other function in R allow me to do that??

Thanks for the help and look forward to your reply.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://stat.ethz.ch/pipermail/r-help/attachments/20000209/33a76974/attachment.html

More information about the R-help mailing list