This function retrieves a Stan model file based on a combination of input parameters, constructs the file path, and loads the Stan model.
get_stan_model(
type = c("glm", "cox"),
glm_family_string = c("gaussian", "binomial"),
joint_tau = FALSE,
glm_binomial_joint_theta = FALSE,
glm_binomial_joint_alpha = FALSE,
glm_gaussian_known_variance = FALSE
)
A compiled Stan model loaded by rstan::stan_model
.
Character, either "glm"
or "cox"
, specifying the type of model to load.
Character, specifying the family for GLM models, either "binomial"
or "gaussian"
.
Required for "glm"
models, ignored for "cox"
models.
Logical, if TRUE
, includes "joint" in the file name to indicate a joint model with tau parameter.
Logical, if TRUE
and glm_family_string
is "binomial"
, includes "theta" in the
file name for joint theta parameter.
Logical, if TRUE
and glm_family_string
is "binomial"
, includes "alpha" in the
file name for joint alpha parameter.
Logical, if TRUE
and glm_family_string
is "gaussian"
, includes
"known_variance" in the file name to specify known variance.