Set parameters controlling the behaviour of egf
.
egf_control(outer_optimizer = egf_optimizer(nlminb),
inner_optimizer = egf_optimizer(newton),
trace = FALSE, profile = FALSE, sparse_X = FALSE,
omp_num_threads = getOption("egf.cores", 1L))
A list inheriting from class egf_control
containing the
validated arguments.
egf_optimizer
objects specifying “outer” and
“inner” optimization methods.
an integer determining the amount of tracing performed; see ‘Details’.
a logical. If TRUE
, then fixed effect coefficients are
profiled out of the likelihood, which may stabilize optimization
for models with many fixed effects.
This “feature” should be considered experimental,
and in fact it may destabilize optimization, as it relies
on assumptions about the optimization problem that are not
necessarily satisfied by the nonlinear mixed effects models fit
by egf
.
a logical. If TRUE
, then the fixed effects design matrix
is represented as a (sparse) dgCMatrix,
rather than as a traditional (dense) matrix.
an integer indicating a number of OpenMP threads to be used when evaluating the objective function, provided that epigrowthfit was compiled with OpenMP support.
Setting trace > 0L
and omp_num_threads > 0L
simultaneously
should be avoided, because tracing messages are printed using R API
functions that are not thread-safe.
trace
affects the amount of information printed during
likelihood evaluations:
0
likelihood evaluations are always silent.
1
a message is printed whenever a negative log marginal likelihood
term is NaN
or exceeds 1e+09
.
2
all negative log marginal likelihood terms are printed.
egf
passes silent = trace == 0L
to
MakeADFun
. A corollary is that nonzero values of
trace
have a number of additional side effects:
error messages are printed during function and gradient evaluations;
the maximum absolute gradient element is printed with each gradient evaluation; and
trace flags set by config
are turned on.
control <- egf_control()
str(control)
Run the code above in your browser using DataLab