s-news
[Top] [All Lists]

Re: lrm

To: jose Bartolomei <surfprjab@hotmail.com>
Subject: Re: lrm
From: Frank E Harrell Jr <f.harrell@vanderbilt.edu>
Date: Tue, 26 Sep 2006 11:16:05 -0500
Cc: s-news@lists.biostat.wustl.edu
In-reply-to: <BAY105-F649543E31D459701578EDB6250@phx.gbl>
References: <BAY105-F649543E31D459701578EDB6250@phx.gbl>
User-agent: Thunderbird 1.5.0.4 (X11/20060713)
jose Bartolomei wrote:
Dear S-Plus users,


I have a problem runing a logistic regression using the Design library.

If I fit a lrm with more than two variables I obtain the following result: (taking as an example the acath data.frame used in "An Introduction to S and The Hmisc and Design Libraries")

fit<-lrm(sigdz ~ age.tertile * sex + choleste)
Problem in model.matrix.default(Terms.ns, X): No data for variable "age.tertile"

or if I use the rcs fuction

fit<-lrm(sigdz~rcs(age,4) * (sex + rcs(choleste, 4)))
Problem in model.matrix.default(Terms.ns, X): No data for variable "rcs(age, 4)"

What could be happening?

Thanks,
jose


--------------------------------------------------------------------
This message was distributed by s-news@lists.biostat.wustl.edu.  To
unsubscribe send e-mail to s-news-request@lists.biostat.wustl.edu with
the BODY of the message:  unsubscribe s-news


Hard to say. You didn't following posting guidelines in sending enough of the code. In particular I don't know if you attached a data frame or have all the variables already in the search path, and whether the tertiles were correctly calculated.

Frank

--
Frank E Harrell Jr   Professor and Chair           School of Medicine
                     Department of Biostatistics   Vanderbilt University

<Prev in Thread] Current Thread [Next in Thread>
  • lrm, jose Bartolomei
    • Re: lrm, Frank E Harrell Jr <=