Closed jburos closed 7 years ago
Seeing the following error when running posterior_survfit on a model where assoc = NULL.
assoc = NULL
Error in e_eta[s, ] <- e_eta[s, ] + linear_predictor.default(abeta_s, : replacement has length zero
Seems likely this is an edge case not accommodated by the posterior_survfit function.
Here is the traceback.
7: ll_event(object, data = dat, pars = pars, survprob = TRUE) 6: FUN(X[[i]], ...) 5: lapply(time_seq, function(t) { if (!identical(length(t), length(id_list))) stop("Bug found: the vector of prediction times is not the same length ", "as the number of individuals.") dat <- jm_data(object, newdataLong = ndL, newdataEvent = ndE, ids = id_list, etimes = t, long_parts = FALSE) surv_t <- ll_event(object, data = dat, pars = pars, survprob = TRUE) if (is.vector(surv_t) == 1L) surv_t <- t(surv_t) surv_t[, (t == 0)] <- 1 if (standardise) { surv_t <- matrix(rowMeans(surv_t), ncol = 1) dimnames(surv_t) <- list(iterations = NULL, "standardised_survprob") } else { dimnames(surv_t) <- list(iterations = NULL, ids = id_list) } surv_t }) 4: rstanarm::posterior_survfit(mj4null, standardise = TRUE, times = 0, extrapolate = TRUE, control = list(condition = FALSE))
stan_jm
e.g.:
> ps_check(mj4null) Error in e_eta[s, ] <- e_eta[s, ] + linear_predictor.default(abeta_s, : replacement has length zero
'master' branch of sambrilleman/rstanarm
3.3.3
Linux (ubuntu)
Summary:
Seeing the following error when running posterior_survfit on a model where
assoc = NULL
.Seems likely this is an edge case not accommodated by the posterior_survfit function.
Description:
Here is the traceback.
Reproducible Steps:
stan_jm
model withassoc = NULL
.e.g.:
RStanARM Version:
'master' branch of sambrilleman/rstanarm
R Version:
3.3.3
Operating System:
Linux (ubuntu)