graemeleehickey/joineR

Issue about the competing risks data

shanpengli opened this issue · 2 comments

Hi, I encountered some issues when I was running your toy example data:

data(epileptic)
epileptic$interaction <- with(epileptic, time * (treat == "LTG"))
longitudinal <- epileptic[, c(1:3, 13)]
survival <- UniqueVariables(epileptic, c(4, 6), "id")
baseline <- UniqueVariables(epileptic, c("treat", "age"), "id")
data <- jointdata(longitudinal = longitudinal,
survival = survival,
baseline = baseline,
id.col = "id",
time.col = "time")
fit2 <- joint(data = data,
long.formula = dose ~ time + treat + interaction + age,
surv.formula = Surv(with.time, with.status2) ~ treat + age,
longsep = FALSE, survsep = FALSE,
gpt = 3)
summary(fit2)

Error in eval(predvars, data, env) : object 'age' not found

I want to build a survival sub-model with multiple covariates but I failed to do so. Do you know how to fix this issue?

Closing this now it has been raised with @petephilipson on separate repo