jmdem.control {jmdem} | R Documentation |
Auxiliary for Controlling JMDEM Fitting
Description
Auxiliary function for jmdem
fitting. Typically only used internally by jmdem.fit
, but may be used to construct a control
argument to either function.
Usage
jmdem.control(maxit = 100, epsilon = 1e-8, prefit.trace = FALSE,
fit.trace = FALSE, null.approx = 1e-8, trace = 0,
fnscale = -1, parscale = 1, ndeps = 0.001,
abstol = -Inf, reltol = sqrt(.Machine$double.eps),
alpha = 1, beta = 0.5, gamma = 2, REPORT = 10,
type = 1, lmm = 5, factr = 1e+07, pgtol = 0,
temp = 10, tmax = 10)
Arguments
maxit |
integer giving the maximal number of optimisation iterations. |
epsilon |
positive convergence tolerance |
prefit.trace |
logical indicating if output should be produced for each iteration in the |
fit.trace |
logical indicating if output should be produced for each iteration in the |
null.approx |
approximisation of zeros to avoid estimation abortion in the case of |
The following control arguments are used by optim
. Please refer to optim
for details
trace |
non-negative integer. If positive, tracing information on the progress of the optimisation is produced. Higher values may produce more tracing information: for method " |
fnscale |
An overall scaling to be applied to the value of |
parscale |
A vector of scaling values for the parameters. Optimisation is performed on |
ndeps |
A vector of step sizes for the finite-difference approximation to the gradient, on |
abstol |
The absolute convergence tolerance. Only useful for non-negative functions, as a tolerance for reaching zero. |
reltol |
Relative convergence tolerance. The algorithm stops if it is unable to reduce the value by a factor of |
alpha , beta , gamma |
Scaling parameters for the " |
REPORT |
The frequency of reports for the " |
type |
for the conjugate-gradients (" |
lmm |
is an integer giving the number of |
factr |
controls the convergence of the " |
pgtol |
helps control the convergence of the " |
tmax |
controls the " |
temp |
is the number of function evaluations at each temperature for the " |
Details
The control argument of jmdem
is by default passed to the control argument of jmdem.fit, which uses its elements as arguments to jmdem.control: the latter provides defaults and sanity checking.
When trace
is true, calls to cat
produce the output for each iteration. Hence, options(digits = *)
can be used to increase the precision, see the example.
Value
A list with components named as the arguments.
Author(s)
Karl Wu Ka Yui (karlwuky@suss.edu.sg)
References
Belisle, C.J.P. (1992). Convergence theorems for a class of simulated annealing algorithms on Rd. Journal of Applied Probability, 29, 885-895.
Byrd, R. H., Lu, P., Nocedal, J. and Zhu, C. (1995). A limited memory algorithm for bound constrained optimisation. SIAM Journal on Scientific Computing, 16, 1190-1208.
Fletcher, R. and Reeves, C.M. (1964). Function minimization by conjugate gradients. Computer Journal, 7, 148-154.
Hastie, T. J. and Pregibon, D. (1992). Generalized linear models. Chapter 6 of Statistical Models in S eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
Nash, J.C. (1990). Compact Numerical Methods for Computers. Linear Algebra and Function Minimisation. Adam Hilger.
Nelder, J.A., Mead, R. (1965). A simplex algorithm for function minimization. Computer Journal, 7, 308-313.
Nocedal, J., Wright, S.J. (1999). Numerical Optimisation. Springer.
Smyth, G.K. (1989). Generalised linear models with varying dispersion. J. R. Statist. Soc. B, 51 (1), 47-60.
Smyth, G.K., Verbyla, A.P. (1999). Adjusted likelihood methods for modelling dispersion in generalised linear models. Environmetrics, 10, 695-709.
Wu, K.Y.K., Li, W.K. (2016). On a dispersion model with Pearson residual responses. Comput. Statist. Data Anal., 103, 17-27.
See Also
jmdem.fit
, the fitting procedure used by jmdem
.
Examples
## Example in jmdem(...). Limit maximum iteration number to 20 and
## trace the deviance development in the fitting process
MyData <- simdata.jmdem.sim(mformula = y ~ x, dformula = ~ s,
mfamily = poisson(),
dfamily = Gamma(link = "log"),
beta.true = c(0.5, 4),
lambda.true = c(2.5, 3), n = 100)
fit <- jmdem(mformula = y ~ x, dformula = ~ s, data = MyData,
mfamily = poisson, dfamily = Gamma(link = "log"),
dev.type = "deviance", method = "CG",
control = list(maxit = 20, fit.trace = TRUE))
## Change to a small convergence tolerance and trace the optimisation
## process in optim
jmdem.control(list(epsilon = 1e-14, trace = 1))