controlMethod constructs a list with all necessary
control parameters for regression fitting in
estimatePopsizeFit and estimatePopsize.
Usage
controlMethod(
epsilon = 1e-08,
maxiter = 1000,
verbose = 0,
printEveryN = 1L,
coefStart = NULL,
etaStart = NULL,
optimMethod = "Nelder-Mead",
silent = FALSE,
optimPass = FALSE,
stepsize = 1,
checkDiagWeights = TRUE,
weightsEpsilon = 1e-08,
momentumFactor = 0,
saveIRLSlogs = FALSE,
momentumActivation = 5,
criterion = c("coef", "abstol", "reltol")
)Arguments
- epsilon
a tolerance level for fitting algorithms by default
1e-8.- maxiter
a maximum number of iterations.
- verbose
a numeric value indicating whether to trace steps of fitting algorithm for
IRLSfitting method different values of verbose give the following information:1 – Returns information on the number of current iteration and current log-likelihood.
2 – Returns information on vector of regression parameters at current iteration (and all of the above).
3 – Returns information on reduction of log-likelihood at current iteration (and all of the above).
4 – Returns information on value of log-likelihood function gradient at current iteration (and all of the above).
5 – Returns information on convergence criterion and values that are taken into account when considering convergence (and all of the above).
if
optimmethod was chosen verbose will be passed tostats::optim()as trace.- printEveryN
an integer value indicating how often to print information specified in
verbose, by default set to1.- coefStart, etaStart
initial parameters for regression coefficients or linear predictors if
NULL. ForIRLSfitting onlyetaStartis needed so ifcoefStartis provided it will be converted toetaStart, foroptimfittingcoefStartis necessary and argumentetaStartwill be ignored.- optimMethod
a method of
stats::optim()used"Nelder-Mead"is the default .- silent
a logical value, indicating whether warnings in
IRLSmethod should be suppressed.- optimPass
an optional list of parameters passed to
stats::optim(..., control = optimPass)if FALSE then list of control parameters will be inferred from other parameters.- stepsize
only for
IRLS, scaling of updates tobetavector lower value means slower convergence but more accuracy by default 1. In general if fitting algorithm fails lowering this value tends to be most effective at correcting it.- checkDiagWeights
a logical value indicating whether to check if diagonal elements of working weights matrixes in
IRLSare sufficiently positive so that these matrixes are positive defined. By defaultTRUE.- weightsEpsilon
a small number to ensure positive definedness of weights matrixes. Only matters if
checkDiagWeightsis set toTRUE. By default1e-8.- momentumFactor
an experimental parameter in
IRLSonly allowing for taking previous step into account at current step, i.e instead of updating regression parameters as: \[\boldsymbol{\beta}_{(a)} = \boldsymbol{\beta}_{(a-1)} + \text{stepsize} \cdot \text{step}_{(a)}\] the update will be made as: \[ \boldsymbol{\beta}_{(a)} = \boldsymbol{\beta}_{(a-1)} + \text{stepsize} \cdot (\text{step}_{(a)} + \text{momentum}\cdot\text{step}_{(a-1)})\]- saveIRLSlogs
a logical value indicating if information specified in
verboseshould be saved to output object, by defaultFALSE.- momentumActivation
the value of log-likelihood reduction bellow which momentum will apply.
- criterion
a criterion used to determine convergence in
IRLS, multiple values may be provided. By defaultc("coef", "abstol").
