Continuing the discussion from RMS Discussions:
Now I have a question on you “rms” package. The question is as follows. I tried to analyze interaction between two continuous variables,regardless of linear or non-linear, on a logistic model using “lrm”, it does work. It shows as follows. When one continuous variable is repaced by a binary variable, it works. I wonder could you kindly let me know how to solve this issue.
Thanks in advance.
library(rms)
d ← datadist(HBPN); options(datadist=‘d’)
fit<- lrm(cvdcomb ~ rcs(AGE1,3)*SBP,data=HBPN)
singular information matrix in lrm.fit (rank= 5 ). Offending variable(s):
AGE1’ * SBP
Warning message:
In lrm(cvdcomb ~ rcs(AGE1, 3) * SBP, data = HBPN) :
Unable to fit model using “lrm.fit”
fit<- lrm(cvdcomb ~ AGE1*SBP,data=HBPN,x=T,y=T)
singular information matrix in lrm.fit (rank= 3 ). Offending variable(s):
AGE1 * SBP
Warning message:
In lrm(cvdcomb ~ AGE1 * SBP, data = HBPN) :
Unable to fit model using “lrm.fit”
Best regards,
Kuibao Li