James Fearon wrote:
Hi,

This concerns lrm in the Design package, which I need for the clustered errors option with panel data.

I have created a variable (using sign()) that has values -1, 0, and 1 (and some NAs). call this variable x3. lrm does not like

t = lrm(y ~ x1 + x2 + I(x3==-1) + I(x3==1), data=data,x=T,y=T)

I get the error message: Error in if (!length(fname) || !any(fname == zname)) { :
 missing value where TRUE/FALSE needed

Running this on the subset of data with non missing x3 values doesn't help.

glm has no problem with this.

Thanks very much,

Jim Fearon

Right, Design does not like variables to be split up. Make x3 a factor and use it just as the single term x3 in the model.

Frank

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

______________________________________________
R-help@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.

Reply via email to