[R] lack of memory for logistic regression in R?

Frank E Harrell Jr f.harrell at vanderbilt.edu
Mon Jun 15 16:41:48 CEST 2009


Michael wrote:
> Yet what's the benefit of using Design Package?
> 
> Thanks!

For logistic models the code is streamlined.  You get automatic tests of 
most interesting hypotheses (e.g., tests of linearity) and easy to make 
graphics including nomograms.  There's also several model validation 
functions.  LaTeX and other methods can print fitted models in an easier 
to interpret fashion when restricted cubic splines and interactions are 
present.  Getting odds ratios for sensible changes of X, when X is 
nonlinear, is easy.

Frank

> 
> On Sun, Jun 14, 2009 at 8:04 PM, Frank E Harrell
> Jr<f.harrell at vanderbilt.edu> wrote:
>> Also it would be useful to compare glm with the lrm function in the Design
>> package, for speed and memory use.
>>
>> Frank
>>
>>
>> David Winsemius wrote:
>>> On Jun 14, 2009, at 9:06 PM, Michael wrote:
>>>
>>>> Hi all,
>>>>
>>>> I am getting the following error message:
>>>>
>>>>> mymodel = glm(response ~ . , family=binomial, data=C);
>>>> Error: cannot allocate vector of size 734.2 Mb
>>>> In addition: Warning messages:
>>>> 1: In array(0, c(n, n), list(levs, levs)) :
>>>>  Reached total allocation of 1535Mb: see help(memory.size)
>>>> 2: In array(0, c(n, n), list(levs, levs)) :
>>>>  Reached total allocation of 1535Mb: see help(memory.size)
>>>> 3: In array(0, c(n, n), list(levs, levs)) :
>>>>  Reached total allocation of 1535Mb: see help(memory.size)
>>>> 4: In array(0, c(n, n), list(levs, levs)) :
>>>>  Reached total allocation of 1535Mb: see help(memory.size)
>>>>
>>>> -----------
>>>>
>>>> The data frame is 60000 x 20,
>>>>
>>>> is it too large for R?
>>>>
>>>> What shall I do? Will close all other softwares/applications help? My
>>>> PC is Vista with 4GB memory. Thank you.
>>> It's certainly not too large for R. Have you looked at the R Windows FAQ
>>> on the topic?
>>>
>>>
>>> http://cran.r-project.org/bin/windows/base/rw-FAQ.html#There-seems-to-be-a-limit-on-the-memory-it-uses_0021
>>>
>>> ... and perhaps:
>>>
>>> http://finzi.psych.upenn.edu/Rhelp08/2008-August/171649.html
>>>
>>>
>>> David Winsemius, MD
>>> Heritage Laboratories
>>> West Hartford, CT
>>>




More information about the R-help mailing list