Re: [R] what's wrong with my "gls"? it does not allocate memory... even for the simplest AR1 model...

From: Spencer Graves <spencer.graves_at_pdf.com>
Date: Thu 18 May 2006 - 10:35:43 EST

          What are col1, ..., col6? Try the following:

          sapply(data2, class)

          Are any of these "factors"? If yes, how many levels? Do you still get the same error from the following:

gls(col1 ~ 1, data=data2, corr=corAR1(0.3202), method='ML')

          If this works, I might then try a binary search to help isolate the problem, starting perhaps with something like the following:

gls(col1 ~ col2+col3+col4-1, data=data2, corr=corAR1(0.3202), method='ML')

gls(col1 ~ col5+col6-1, data=data2, corr=corAR1(0.3202), method='ML')

          Also, how many observations in "data2"? If "data2" has many rows, how far can you small can you make data2 and still get the same error?

          Have you consulted Pinheiro and Bates (2000) Mixed-Effects Models in S and S-Plus (Springer)? If no, I suggest you get that book and study it carefully before doing much more in this area. Bates is one of the leading experts in this field, and the 'nlme' and 'lme4' packages are primarily his work, with the help of a number of graduate students, including Jose Pinheiro. The book is reasonably well written, and contains much wisdom that is difficult to find elsewhere.

          If you'd like more help from this listserve, PLEASE do read the posting guide! "www.R-project.org/posting-guide.html", especially the part about providing a simple, self-contained example that illustrates your problem. Can you produce a much simpler example that produces the same error with, say, a data.frame of only 2 or 3 columns of random numbers that can be generated with only a very few lines of R code that would allow someone else to actually reproduce the error you see? If you can do that, you will much more likely get a useful reply quicker.

          And please include "sessionInfo()". If you are NOT already on R2.3.0 with nlme 3.1-72, please get current before you complain.

	  hope this helps.
	  Spencer Graves

Michael wrote:

>> myfit1 <- gls(col1 ~ col2+col3+col4+col5+col6-1, data=data2, corr=corAR1(

> 0.3202), method='ML')
> Error: cannot allocate vector of size 199712 Kb
>
> if I get rid of the "corr=corAR1(0.3202)" option, it works okay...
>
> can anybody help me?
>
> thanks a lot!
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> 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


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 Thu May 18 10:41:53 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Thu 18 May 2006 - 12:10:11 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.