sem (version 2.1-1)

optimizers: sem Optimizers

Description

These 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.

Usage

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, ...)

Arguments

start
a vector of start values for the parameters.
objective
the objective function to be optimized; see objective.functions.
gradient
TRUE if an analytic gradient is to be used (if one is available).
maxiter
the maximum number of iterations allowed.
debug
TRUE to show the iteration history and other available information about the optimization.
par.size
"startvalues" to have the optimizer scale the problem according to the magitudes of the start values (ignored by optimizerNlminb).
model.description
a list with elements describing the structural-equation model (see the code for details).
warn
if FALSE, suppress warnings during the optimization.
method
the method to be employed by the optim optimizer; the default is "CG" (conjugate-gradient).
...
additional arguments for the nlm, optim, or nlminb optimizer.

Value

  • An object of class "semResult", with elements:
  • convergenceTRUE if the optimization apparently converged.
  • iterationsthe number of iterations required.
  • parthe vector of parameter estimates.
  • vcovthe estimated covariance matrix of the parameter estimates, based on a numeric Hessian; not supplied by optimizerNlminb.
  • criterionthe optimized value of the objective function.
  • Cthe model-implied covariance or moment matrix at the parameter estimates.
  • Athe estimated $A$ matrix.
  • Pthe estimated $P$ matrix.

See Also

sem, objective.functions, nlm, optim, nlminb