diff --git a/R/dynamite.R b/R/dynamite.R index 33ac3fb..9c94bfa 100644 --- a/R/dynamite.R +++ b/R/dynamite.R @@ -237,12 +237,7 @@ dynamite <- function(dformula, data, time, group = NULL, # copy so that get_data can still return the full stan_input via debug stan_input_out <- stan_input stan_input_out$sampling_vars <- NULL - n_draws <- ifelse_( - is.null(stanfit), - 0L, - (stanfit@sim$n_save[1L] - stanfit@sim$warmup2[1L]) * - stanfit@sim$chains - ) + n_draws <- ifelse_(is.null(stanfit), 0L, get_ndraws(stanfit)) out <- structure( list( stanfit = stanfit, diff --git a/R/stan_utilities.R b/R/stan_utilities.R index 301a393..8bd6d1b 100644 --- a/R/stan_utilities.R +++ b/R/stan_utilities.R @@ -225,7 +225,7 @@ get_diagnostics.stanfit <- function(x) { } get_diagnostics.CmdStanMCMC <- function(x) { - x$diagnostic_summary(x) + x$diagnostic_summary() } get_max_treedepth.stanfit <- function(x) { @@ -256,7 +256,7 @@ get_draws.stanfit <- function(x, pars) { } get_draws.CmdStanMCMC <- function(x, pars) { - x$draws(varibles = pars) + x$draws(variables = pars) } get_elapsed_time.stanfit <- function(x) {