Closed BangyaoZhao closed 1 year ago
No, this will not work correctly. You will need to use the development version from GitHub and the vabs()
function, e.g.,
lmeFit <- lme(log(serBilir) ~ year * sex, data = pbc2, random = ~ year | id)
CoxFit <- coxph(Surv(years, status2) ~ sex, data = pbc2.id)
jointFit <- jm(CoxFit, lmeFit, time_var = "year",
functional_forms = ~ value(log(serBilir)) + vabs(slope(log(serBilir))))
summary(jointFit)
Thank you for this great package. I want to specify the
functional_forms
in thejm
function as something like~value(variable) + abs(slope(variable))
. The purpose is to model the absolute value of the slope (so negative slopes and positive slopes are treated the same). Currently, the code raises no error and no warning if I do that. I just want to make sure if this is the correct way to do it.