Hi,

 

I'm trying to fit a binary logistic regression model, and would like to consider certain characteristics B and C only for people with variable A=1 and not for those with variable A=0, so I'm trying to do the following:

 

model<- lrm(formula= y ~  A: (B+C) + D + E +...)

 

I've had no problem with adding interaction terms using " * ", but every time I try to use " : ", as in my example, I get an error message like:

 

Error in if (!length(fname) || !any(fname == zname)) { : 

            Missing value where TRUE/FALSE needed

 

I would really appreciate any advice on how to solve this, I don't know what in the notation should be different for different operators.

 

Thanks in advance, kind regards, 

 

Alejandra Solís 

 


	[[alternative HTML version deleted]]


