Open DBecker7 opened 4 years ago
Thanks for the test case!
For future devel reference: inla.surv() generates a list of variables, that converts survival type data into information needed by the .surv response models. Current inlabru code can only handle numeric vectors as observation variables, so it needs to be either extended to handle collections of vectors, or there needs to be a special like() feature to handle survival data, or a combination of those.
Minimal Example:
The error is generated by the
make.stack()
function, which sendsas.data.frame(lhood$data)[, lhood$response]
into theeval.if.function()
function, which tests whether it's a function or if it's numeric. Sincelhood$response
is a character vector with the names ininla.surv()
(in this case,"time.m"
and"status"
), the result is a data frame and thus it is neither numeric nor a function. The else ineval.if.function()
is triggered, which reports the error.