Control Parameters for GLMs with Extra Parameters
glmx.control.RdVarious parameters that control fitting of generalized linear models
with extra parameters using glmx.
Usage
glmx.control(profile = TRUE, nuisance = FALSE,
start = NULL, xstart = NULL, hessian = TRUE, method = "BFGS",
epsilon = 1e-8, maxit = c(500, 25), trace = FALSE,
reltol = .Machine$double.eps^(1/1.2), ...)Arguments
- profile
logical. Should the extra parameters be optimized via profile likelihood (or via the full likelihood of all parameters)?
- nuisance
logical. Should the extra parameters be treated as nuisance parameters (i.e., suppressed in subsequent output)?
- start
an optional vector with starting values for the GLM coefficients.
- xstart
an optional vector with starting values for the extra parameter(s). Must be supplied if there is more than one extra parameter.
- hessian
logical or character. Should the hessian be computed to estimate the covariance matrix? If character,
hessiancan be either"none","optim"or"numDeriv". The default is the hessian fromoptimbut alternativelyhessianfrom the numDeriv package can be used.- method
characters string specifying the
methodargument passed tooptim.- epsilon
numeric convergance tolerance passed to
glm.control.- maxit
integer specifying the
maxitargument (maximal number of iterations) passed tooptimandglm.control. Can also be a vector of length 2.- trace
logical or integer controlling whether tracing information on the progress of the optimization should be produced (passed to
optim, andglm.control). Can also be a vector of length 2.- reltol, ...
arguments passed to
optim.
Details
All parameters in glmx are estimated by maximum likelihood
using optim with control options set in glmx.control.
Either the parameters can be found by only optimizing over the extra parameters
(and then using glm.fit to estimate the GLM coefficients),
or alternatively all parameters can be optimized simultaneously.
Covariances are derived numerically using the Hessian matrix returned by
optim.