Skip to contents

NOTE: 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 MultistateModel object.

data

A JointData or PathData object.

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, pathfinder or optimize method of the 'CmdStanR' model.

Value

A MultistateModelFit object.