controlMethod
constructs a list with all necessary
control parameters for regression fitting in
estimatePopsizeFit
and estimatePopsize
.
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")
)
List with selected parameters, it is also possible to call list directly.
a tolerance level for fitting algorithms by default 1e-8
.
a maximum number of iterations.
a numeric value indicating whether to trace steps of fitting algorithm for
IRLS
fitting 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 optim
method was chosen verbose will be passed to stats::optim()
as trace.
an integer value indicating how often to print information
specified in verbose
, by default set to 1
.
initial parameters for regression coefficients
or linear predictors if NULL
. For IRLS
fitting only etaStart
is needed so if coefStart
is provided it will be converted to etaStart
,
for optim
fitting coefStart
is necessary and argument etaStart
will be ignored.
a method of stats::optim()
used "Nelder-Mead"
is the default .
a logical value, indicating whether warnings in IRLS
method should be suppressed.
an optional list of parameters passed to stats::optim(..., control = optimPass)
if FALSE then list of control parameters will be inferred from other parameters.
only for IRLS
, scaling of updates to beta
vector
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.
a logical value indicating whether to check if diagonal
elements of working weights matrixes in IRLS
are sufficiently positive
so that these matrixes are positive defined. By default TRUE
.
a small number to ensure positive definedness of weights matrixes.
Only matters if checkDiagWeights
is set to TRUE
.
By default 1e-8
.
an experimental parameter in IRLS
only allowing for
taking previous step into account at current step, i.e instead of
updating regression parameters as:
_(a) =
_(a-1) + stepsize step_(a)
the update will be made as:
_(a) = _(a-1) + stepsize (step_(a) + momentumstep_(a-1))
a logical value indicating if information specified in
verbose
should be saved to output object, by default FALSE
.
the value of log-likelihood reduction bellow which momentum will apply.
a criterion used to determine convergence in IRLS
,
multiple values may be provided. By default c("coef", "abstol")
.
Piotr Chlebicki, Maciej Beręsewicz
estimatePopsize()
estimatePopsizeFit()
controlModel()
controlPopVar()