Creates MB model.
model(
x = NULL,
...,
code = NULL,
gen_inits = NULL,
random_effects = list(),
fixed = getOption("mb.fixed", "^[^e]"),
derived = character(0),
select_data = list(),
center = character(0),
scale = character(0),
modify_data = identity,
nthin = getOption("mb.nthin", 1L),
new_expr = NULL,
new_expr_vec = getOption("mb.new_expr_vec", FALSE),
modify_new_data = identity,
drops = list()
)
A string, or an object inheriting from class `"mb_code"`.
Unused arguments.
Passed on to [mb_code()]. If `x` is not `NULL`, `code` must be `NULL`, and vice versa.
A single argument function taking the modified data and returning a named list of initial values.
A named list specifying the random effects and the associated factors.
A string of a regular expression specifying the fixed pars to monitor.
A character vector of the derived pars to monitor.
A named list specifying the columns to select and their associated classes and values as well as transformations and scaling options.
A character vector of the columns to center.
A character vector of the columns to scale (after centering).
A single argument function to modify the data (in list form) immediately prior to the analysis.
A count specifying the thinning interval.
A string of R code specifying the predictive relationships.
A flag specifying whether to vectorize the new_expr code.
A single argument function to modify new data (in list form) immediately prior to calculating new_expr.
A list of character vector of possible scalar pars to drop (fix at 0).
An object inherting from class mb_model.
For tmb models gen_inits must specify all the fixed pars. Missing random pars are assigned the value 0.
For jmb models unspecified the initial values for each chain are drawn from the prior distributions.