I am trying to estimate Cox proportional hazards model for transition from state 1 to state 2 using R survival
package as follows:
Altman <- coxph(Surv(Tstart, Tstop, to == 2) ~ wWCTA + wRETA + wEBITTA + wMETL +
wSTA, data=Multistate, subset = from == 1,
frailty(x=id, distribution= "gamma"))
When I am estimating the model without the frailty
argument, its working fine. But when I am including it, I am getting the following error:
Error in if (any(ord > 1)) stop("Penalty terms cannot be in an interaction") :
missing value where TRUE/FALSE needed
Can anyone please explain where I am going wrong?
Regards,
J