objective.functions | R Documentation |
These functions return objective functions suitable for use with optimizers
called by sem
. The user would not
normally call these functions directly, but rather supply one of them in the objective
argument to
sem
. Users may also write their own objective functions. objectiveML
and objectiveML2
are for multinormal maximum-likelihood
estimation; objectiveGLS
and objectiveGLS2
are for generalized least squares; and objectiveFIML2
is for so-called “full-information maximum-likelihood” estimation in the presence of missing data. The FIML estimator
provides the same estimates as the ML estimator when there is no missing data; it can be slow because it iterates over
the unique patterns of missing data that occur in the data set.
objectiveML
and objectiveGLS
use
compiled code and are therefore substantially faster. objectiveML2
and objectiveGLS2
are provided primarily to illustrate
how to write sem
objective functions in R. msemObjectiveML
uses compiled code is for fitting multi-group models by
multinormal maximum likelihood; msemObjectiveML2
is similar but doesn't use compiled code. msemObjectiveGLS
uses compiled
code and is for fitting multi-group models by generalized least squares.
objectiveML(gradient=TRUE, hessian=FALSE)
objectiveML2(gradient=TRUE)
objectiveGLS(gradient=FALSE)
objectiveGLS2(gradient=FALSE)
objectiveFIML(gradient=TRUE, hessian=FALSE)
objectiveFIML2(gradient=TRUE, hessian=FALSE)
msemObjectiveML(gradient=TRUE)
msemObjectiveML2(gradient=TRUE)
msemObjectiveGLS(gradient=FALSE)
gradient |
If |
hessian |
If |
These functions return an object of class "semObjective"
, with up to two elements:
objective |
an objective function. |
gradient |
a gradient function. |
John Fox jfox@mcmaster.ca
See sem
.
sem
, optimizers
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.