fit.glinv finds the maximum likelihood estimate of a glinv model by solving a numerical
optimisation problem.
# S3 method for glinv
fit(
object,
parinit = NULL,
method = "L-BFGS-B",
lower = -Inf,
upper = Inf,
use_optim = FALSE,
project = NULL,
projectArgs = NULL,
num_threads = 2L,
control = list(),
...
)fit.glinv returns a list containing at least the following elements:
The maximum likelihood estimate.
The log-likelihood at the maximum likelihood estimate.
The gradient of log-likelihood at the maximum likelihood estimate.
Zero if the optimisation routine has converged successfully.
A message from the optimisation routine.
An object of class glinv.
A vector, parameter for initialisation of the optimisation routine.
One of L-BFGS-B, CG, BB, or any other methods which is accepted by optim.
A vector of lower bounds on the parameters.
A vector of upper bounds on the parameters.
If true, use optim's version of L-BFGS-B and CG.
Passed to BBoptim.
Passed to BBoptim.
Number of threads to use when computing the gradient
Options to be passed into each the underlying optimisation routine's control
argument.
Not used.
If method is L-BFGS-B, then lbfgsb3c is used for optimisation;
if it is CG then Rcgmin from the optimx package is used; if it
is BB then BBoptim is used, otherwise the method argument is passed to
optim.
By default, L-BFGS-B declares convergence when the change of function value is small, CG
tests stops when change of gradient squared-Euclidean-norm is small, BB stops when either the
change of function values, or the infinity norm of a project gradient, is small. These can be changed
through the control argument and the user should refer to the optimisation packages' respective
documentation for details.
The user can opt for using optim's version of CG and L-BFGS-B. The
implementation in optim of the methods does not incorporate improvements of the
methods in the recent decades, but they have stood the test of time.
If parinit were not supplied and the distance between lower and upper is infinite,
the initialisation point of the optimisation is drawn from a uniform distribution ranging [-1,1]
distribution. If initalisation were not supplied, but the distance between lower and upper
is finite, then the initialisation is drawn from a uniform distribution ranging
[lower, upper].