unitquantreg.control {unitquantreg} | R Documentation |
Control parameters for unit quantile regression
Description
Auxiliary function that control fitting of unit quantile
regression models using unitquantreg
.
Usage
unitquantreg.control(
method = "BFGS",
hessian = FALSE,
gradient = TRUE,
maxit = 5000,
factr = 1e+07,
reltol = sqrt(.Machine$double.eps),
trace = 0L,
starttests = FALSE,
dowarn = FALSE,
...
)
Arguments
method |
string. Specify the method argument passed to |
hessian |
logical. Should use the numerically Hessian matrix to compute
variance-covariance? Default is |
gradient |
logical. Should use the analytic gradient? Default is
|
maxit |
integer. Specify the maximal number of iterations passed to
|
factr |
numeric.Controls the convergence of the |
reltol |
numeric. Relative convergence tolerance passed to |
trace |
non-negative integer. If positive, tracing information on the progress of the optimization is produced. |
starttests |
logical. Should |
dowarn |
logical. Show warnings generated by |
... |
arguments passed to |
Details
The control
argument of
unitquantreg
uses the arguments of
unitquantreg.control
. In particular, the
parameters in unitquantreg
are estimated by
maximum likelihood using the optimx
, which is a
general-purpose optimization wrapper function that calls other R tools for
optimization, including the existing optim
function.
The main advantage of optimx
is to unify the tools
allowing a number of different optimization methods and provide sanity checks.
Value
A list with components named as the arguments.
Author(s)
André F. B. Menezes
References
Nash, J. C. and Varadhan, R. (2011). Unifying Optimization Algorithms to Aid Software System Users: optimx for R., Journal of Statistical Software, 43(9), 1–14.
See Also
optimx
for more details about control
parameters and unitquantreg.fit
the fitting
procedure used by unitquantreg
.
Examples
data(sim_bounded, package = "unitquantreg")
sim_bounded_curr <- sim_bounded[sim_bounded$family == "uweibull", ]
# Fitting using the analytical gradient
fit_gradient <- unitquantreg(formula = y1 ~ x,
data = sim_bounded_curr, tau = 0.5,
family = "uweibull",
control = unitquantreg.control(gradient = TRUE,
trace = 1))
# Fitting without using the analytical gradient
fit_nogradient <- unitquantreg(formula = y1 ~ x,
data = sim_bounded_curr, tau = 0.5,
family = "uweibull",
control = unitquantreg.control(gradient = FALSE,
trace = 1))
# Compare estimated coefficients
cbind(gradient = coef(fit_gradient), no_gradient = coef(fit_nogradient))