Fit a model using 'Stan'
fit_stan.RdNOTE: This function has a side effect of setting covariate normalizers, prior assumed mean baseline hazard, and concentration upper bound (PK) based on data.
Usage
fit_stan(
model,
data,
set_normalizers = TRUE,
set_prior_h0 = TRUE,
filepath = NULL,
return_stanfit = FALSE,
max_conc_factor = 100,
method = "sample",
...
)Arguments
- model
A
MultistateModelobject.- data
- set_normalizers
Set covariate normalization automatically?
- set_prior_h0
Set prior mean average baseline hazard levels based on data?
- filepath
Deprecated.
- return_stanfit
Return also the raw 'Stan' fit object?
- max_conc_factor
Factor to multiply observed max concentration by to get concentration upper bound.
- method
Must be one of
"sample"(default),"pathfinder"or"optimize".- ...
Arguments passed to the
sample,pathfinderoroptimizemethod of the 'CmdStanR' model.
Value
A MultistateModelFit object.
See also
Other Stan-related functions:
create_stan_data(),
create_stan_model(),
default_stan_filepath(),
ensure_exposed_stan_functions(),
plot_stan_data_integral(),
plot_stan_data_matrix()