objective.functions: sem Objective-Function Builders

Description Usage Arguments Value Author(s) References See Also

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
objectiveML(gradient=TRUE, hessian=FALSE)
objectiveML2(gradient=TRUE)

objectiveGLS(gradient=FALSE)
objectiveGLS2(gradient=FALSE)

msemObjectiveML(gradient=TRUE)
msemObjectiveML2(gradient=TRUE)

msemObjectiveGLS(gradient=FALSE)

Arguments

gradient

If TRUE, the object that's returned includes a function for computing an analytic gradient; there is at present no analytic gradient available for objectiveGLS, objectiveGLS2, or msemObjectiveGL.

hessian

If TRUE, the objected returned includes a function to compute an analytic Hessian; only avaiable for objectiveML and not generally recommended.

Value

These functions return an object of class "semObjective", with up to two elements:

objective

an objective function.

gradient

a gradient function.

Author(s)

John Fox jfox@mcmaster.ca

References

See sem.

See Also

sem, optimizers


sem3 documentation built on May 2, 2019, 5:48 p.m.