home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / sci / math / stat / 2751 < prev    next >
Encoding:
Text File  |  1993-01-12  |  1.5 KB  |  37 lines

  1. Newsgroups: sci.math.stat
  2. Path: sparky!uunet!news.claremont.edu!ucivax!ucla-cs!ucla-mic!agsm!iwelch
  3. From: iwelch@agsm.ucla.edu (Ivo Welch)
  4. Subject: S: lm() problem.
  5. Message-ID: <1993Jan12.102240.12909@mic.ucla.edu>
  6. Nntp-Posting-Host: risc.agsm.ucla.edu
  7. Organization: UCLA, Anderson Graduate School Of Management
  8. Date: 12 Jan 93 10:22:40 PST
  9. Lines: 26
  10.  
  11.  
  12. [S on NeXT; an April 1992 version; NeXTStep 3.0; 32MB RAM; ~40-80MB free disk]
  13.  
  14. I am having a serious problem with lm()'s use of disk space. I have a panel
  15. data set with 1,109 observations and 37 variables, or about 164K in float
  16. storage. One of these variables is a categorical factor, taking about 400
  17. values (firm id's). A rough computation tells me that I would need a maximum
  18. of 1MB (double) space to store one copy of the X'X matrix in full form.
  19.  
  20. > result <- lm(formula.complete, can, subset= (date<breakdate), singular.ok=TRUE)
  21. Error in data[1:ll] <- old: Cannot allocate 39516128 bytes:
  22.         options("object.size") is 20000000
  23.  
  24. Now this is a bit too much for my somewhat limited computer. (After I allow
  25. more 40MB as object.size, I get a swapspace overflow.) How can lm() be so
  26. voracious? Is there any way to tell it to be a bit more graceful about its
  27. memory appetite? (I need to move to about 1,000 variables and 2,000 obs at
  28. some point.) Obviously, rewriting lm() (for an S beginner like myself) is very
  29. undesirable.
  30.  
  31. Please respond to me. I will summarize any helpful suggestions.
  32.  
  33. /ivo
  34.  
  35. PS: This is why I cannot do my problem in S. I will post a question on SAS,
  36. where I also tried to solve my problem soon.
  37.