sambrilleman / rstanarm

rstanarm R package for Bayesian applied regression modeling
http://mc-stan.org/interfaces/rstanarm.html
GNU General Public License v3.0
0 stars 1 forks source link

bug in `ps_check`: object 'biomarker_family' not found #41

Closed jburos closed 7 years ago

jburos commented 7 years ago

Summary:

Seeing the following when running ps_check:

Error in base::try(biomarker_family, TRUE) : object 'biomarker_family' not found
7.
get_element(parts, m = m, "lag", ...)
6.
make_assoc_terms(parts = y_X, assoc = assoc, family = object$family, beta = beta_s, b = b_s)
5.
pp_survcalc(object, y_X = y_X, e_X = e_X, eventtime = t, quadpoints = quadpoints, quadweights = quadweights, stanmat = stanmat)
4.
FUN(X[[i]], ...)
3.
lapply(time_seq, function(t, quadnodes) { 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.") ...
2.
posterior_survfit(object, standardise = TRUE, condition = FALSE, times = 0, extrapolate = TRUE, draws = draws, seed = seed)
1.
rstanarm::ps_check(jm1)

Description:

Model spec:

stan_jm(formulaLong = [omitted], 
              dataLong = [omitted],
              formulaEvent = [omitted],
              dataEvent = [omitted], 
              time_var = "months", 
              assoc = c("etavalue", "etaslope"),
              iter = 5000, 
              chains = 4, 
              adapt_delta = 0.99
)

Reproducible Steps:

(coming soon)

RStanARM Version:

recent install of sambrilleman/rstanarm@develop

R Version:

R version 3.3.3 (2017-03-06) -- "Another Canoe"

Operating System:

Ubuntu Platform: x86_64-pc-linux-gnu (64-bit)

sambrilleman commented 7 years ago

I'm a little puzzled by this one. I don't recall ever using an object in the code called 'biomarker_family'. And looking at that section of the make_assoc_terms and get_element functions I can't really work out where it is getting stuck! I may need to reproduce the error in order to debug it. Or perhaps you are able to rerun it with debug and see if it becomes obvious which function the 'base::try(biomarker_family, TRUE)' is being called from...?

jburos commented 7 years ago

When I re-executed this model in a clean environment I didn't see the same error, so closing this until I see it again or know where the error is coming from.