The default optimizer used by sem
is optimizerSem
, which employs compiled code and is integrated with
the objectiveML
and objectiveGLS
objective functions;
optimizerSem
, written by Zhenghua Nie, is a modified
version of the standard R nlm
optimizer, which was written by Saikat DebRoy, R-core, and Richard H. Jones.
The other functions call optimizers (nlm
, optim
, or nlminb
),
to fit structural equation models, and are called by the sem
function.
The user would not normally call these functions directly, but rather supply one of them in the optimizer
argument to
sem
. Users may also write them own optimizer functions. msemOptimizerNlm
is for fitting multigroup models, and also adapts the nlm
code.
optimizerSem(start, objective=objectiveML,
gradient=TRUE, maxiter, debug, par.size, model.description, warn, ...)
optimizerMsem(start, objective=msemObjectiveML, gradient=TRUE,
maxiter, debug, par.size, model.description, warn=FALSE, ...)
optimizerNlm(start, objective=objectiveML, gradient=TRUE,
maxiter, debug, par.size, model.description, warn, ...)
optimizerOptim(start, objective=objectiveML, gradient=TRUE,
maxiter, debug, par.size, model.description, warn, method="CG", ...)optimizerNlminb(start, objective=objectiveML, gradient=TRUE, maxiter,
debug, par.size, model.description, warn, ...)
msemOptimizerNlm(start, objective=msemObjectiveML, gradient=TRUE,
maxiter, debug, par.size, model.description, warn=FALSE, ...)
An object of class "semResult"
, with elements:
TRUE
if the optimization apparently converged.
the number of iterations required.
the vector of parameter estimates.
the estimated covariance matrix of the parameter estimates, based on a numeric Hessian; not supplied by optimizerNlminb
.
the optimized value of the objective function.
the model-implied covariance or moment matrix at the parameter estimates.
the estimated \(A\) matrix.
the estimated \(P\) matrix.
a vector of start values for the parameters.
the objective function to be optimized; see objective.functions.
TRUE
if an analytic gradient is to be used (if one is available).
the maximum number of iterations allowed.
TRUE
to show the iteration history and other available information about the optimization.
"startvalues"
to have the optimizer scale the problem according to the magitudes of the start values (ignored by optimizerNlminb
).
a list with elements describing the structural-equation model (see the code for details).
if FALSE
, suppress warnings during the optimization.
the method to be employed by the optim
optimizer; the default is "CG"
(conjugate-gradient).
additional arguments for the nlm
, optim
, or nlminb
optimizer.
John Fox jfox@mcmaster.ca, and Zhenghua Nie, in part adapting work by Saikat DebRoy, R-core, and Richard H. Jones.