Define a list of control parameters. Note that
the format of this input is likely to change more rapidly than that of
dsem
Usage
dsem_control(
nlminb_loops = 1,
newton_loops = 1,
trace = 0,
eval.max = 1000,
iter.max = 1000,
getsd = TRUE,
quiet = FALSE,
run_model = TRUE,
gmrf_parameterization = c("separable", "projection"),
constant_variance = c("conditional", "marginal", "diagonal"),
use_REML = TRUE,
profile = NULL,
parameters = NULL,
map = NULL,
getJointPrecision = FALSE,
extra_convergence_checks = TRUE
)
Arguments
- nlminb_loops
Integer number of times to call
nlminb
.- newton_loops
Integer number of Newton steps to do after running
nlminb
.- trace
Parameter values are printed every `trace` iteration for the outer optimizer. Passed to `control` in
nlminb
.- eval.max
Maximum number of evaluations of the objective function allowed. Passed to `control` in
nlminb
.- iter.max
Maximum number of iterations allowed. Passed to `control` in
nlminb
.- getsd
Boolean indicating whether to call
sdreport
- quiet
Boolean indicating whether to run model printing messages to terminal or not;
- run_model
Boolean indicating whether to estimate parameters (the default), or instead to return the model inputs and compiled TMB object without running;
- gmrf_parameterization
Parameterization to use for the Gaussian Markov random field, where the default `separable` constructs a precision matrix that must be full rank, and the alternative `projection` constructs a full-rank and IID precision for variables over time, and then projects this using the inverse-cholesky of the precision, where this projection can be rank-deficient.
- constant_variance
Whether to specify a constant conditional variance \( \mathbf{\Gamma \Gamma}^t\) using the default
constant_variance="conditional"
, which results in a changing marginal variance along the specified causal graph when lagged paths are present. Alternatively, the user can specify a constant marginal variance usingconstant_variance="diagonal"
orconstant_variance="marginal"
, such that \( \mathbf{\Gamma}\) and \(\mathbf{I-P}\) are rescaled to achieve this constraint. All options are equivalent when the model includes no lags (only simultaneous effects) and no covariances (no two-headed arrows)."diagonal"
and"marginal"
are equivalent when the model includes no covariances. Given some exogenous covariance,constant_variance = "marginal"
preserves the conditional correlation and has changing conditional variance, whileconstant_variance = "marginal"
has changing conditional correlation along the causal graph.- use_REML
Boolean indicating whether to treat non-variance fixed effects as random, either to motigate bias in estimated variance parameters or improve efficiency for parameter estimation given correlated fixed and random effects
- profile
Parameters to profile out of the likelihood (this subset will be appended to
random
with Laplace approximation disabled).- parameters
list of fixed and random effects, e.g., as constructed by
dsem
and then modified by hand (only helpful for advanced users to change starting values or restart at intended values)- map
list of fixed and mirrored parameters, constructed by
dsem
by default but available to override this default and then pass toMakeADFun
- getJointPrecision
whether to get the joint precision matrix. Passed to
sdreport
.- extra_convergence_checks
Boolean indicating whether to run extra checks on model convergence.