[R] "Unable to fit" error message from the lrm function in the rms library

From: Josh B <joshb41_at_yahoo.com>
Date: Sat, 19 Jun 2010 19:40:51 -0700 (PDT)

Hi all,

I have another question about the lrm function (from the rms library) that I cannot find the answer to.

I get an error message when I try to fit a model, and I don't know what to make of it. Please forgive me for not having a toy example, but it appears the size and complexity of my data is somehow causing the error. The best I can do is show you what I type and what errors I get.

Here's what I'm doing that causes the error. I fit this model:

> model.lrm24 <- lrm(x.all[,156] ~ pol(PC1, 3) + pol(PC2, 3) + pol(PC3, 3) + PCNM1 + PCNM2 + PCNM3 +PCNM4 + PCNM5 + PCNM6 + PCNM7 + PCNM8 + PCNM9 + PCNM10 + PCNM11 + PCNM12 + PCNM13 + PCNM14 + PCNM15 + PCNM16 + PCNM17 + PCNM18 + PCNM19 + PCNM20 + PCNM21 + PCNM22 + PCNM23 + PCNM24 + PCNM25 + PCNM26 + PCNM27 + PCNM28 + PCNM29 + PCNM30 + PCNM31 + PCNM32 + PCNM33 + PCNM34 + PCNM35 + PCNM36 + PCNM37 + PCNM38 + PCNM39, data=x.all)

...and I get this error:

Error in lrm(x.all[, 156] ~ pol(PC1, 3) + pol(PC2, 3) + pol(PC3, 3) + :   Unable to fit model using “lrm.fit”

The weird thing is that the model still seems to have been "fit" anyway. For instance:

> model.lrm24$stats

         Obs Max Deriv Model L.R. d.f. P 3.610000e+02 5.352815e-02 1.251547e+02 4.800000e+01 8.340322e-09

           C Dxy Gamma Tau-a R2 8.795642e-01 7.591284e-01 7.631040e-01 2.578793e-01 4.522090e-01

       Brier g gr gp 1.113480e-01 3.489163e+00 3.275851e+01 2.494908e-01

So it still seems it was able to run, at least to some extent, despite it's protests.

Any ideas what is going on? Why does the model run if it is "unable" to be fit? That seems contradictory on its face. What does that even mean?

Here's a hint to the source of the problem. If I fit a simplified model, the error message goes away:

> model.lrm24 <- lrm(x.all[,156] ~ pol(PC1, 3) + pol(PC2, 3) + pol(PC3, 3), data=x.all)

No problem at all -- no error.

Here's what the same summary output looks like, from the simplified model:

> model.lrm24$stats

         Obs Max Deriv Model L.R. d.f. P 2.030000e+02 2.861290e-01 7.180027e+01 9.000000e+00 6.747713e-12

           C Dxy Gamma Tau-a R2 8.195579e-01 6.391159e-01 6.424134e-01 2.975662e-01 4.077021e-01

       Brier g gr gp 1.583826e-01 2.032737e+00 7.634955e+00 2.869544e-01

So what's going on here? Any ideas? And why does the model still seem to be "fit" despite the claim it was "unable" to be fit? Thanks very much in advance -- you guys are great.

Josh Banta, Ph.D
Center for Genomics and Systems Biology
New York University
100 Washington Square East
New York, NY 10003
Tel: (212) 998-8465
	[[alternative HTML version deleted]]


R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sun 20 Jun 2010 - 04:00:31 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 20 Jun 2010 - 12:10:33 GMT.

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

list of date sections of archive