Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

estfun

Extract Empirical Estimating Functions


Description

A function for extracting the empirical estimating functions of a fitted lavaan model. This is the derivative of the objective function with respect to the parameter vector, evaluated at the observed (case-wise) data. In other words, this function returns the case-wise scores, evaluated at the fitted model parameters.

Usage

estfun.lavaan(object, scaling = FALSE, ignore.constraints = FALSE,
              remove.duplicated = TRUE, remove.empty.cases = TRUE)
lavScores(object, scaling = FALSE, ignore.constraints = FALSE,
          remove.duplicated = TRUE, remove.empty.cases = TRUE)

Arguments

object

An object of class lavaan.

scaling

If TRUE, the scores are scaled to reflect the specific objective function used by lavaan. If FALSE (the default), the objective function is the loglikelihood function assuming multivariate normality.

ignore.constraints

Logical. If TRUE, the scores do not reflect the (equality or inequality) constraints. If FALSE, the scores are computed by taking the unconstrained scores, and adding the term t(R) lambda, where lambda are the (case-wise) Lagrange Multipliers, and R is the Jacobian of the constraint function. Only in the latter case will the sum of the columns be (almost) equal to zero.

remove.duplicated

If TRUE, and all the equality constraints have a simple form (eg. a == b), the unconstrained scores are post-multiplied with a transformation matrix in order to remove the duplicated parameters.

remove.empty.cases

If TRUE, empty cases with only missing values will be removed from the output.

Value

A n x k matrix corresponding to n observations and k parameters.

Author(s)

Ed Merkle; the remove.duplicated, ignore.constraints and remove.empty.cases arguments were added by Yves Rosseel


lavaan

Latent Variable Analysis

v0.6-10
GPL (>= 2)
Authors
Yves Rosseel [aut, cre] (<https://orcid.org/0000-0002-4129-4477>), Terrence D. Jorgensen [aut] (<https://orcid.org/0000-0001-5111-6773>), Nicholas Rockwood [aut] (<https://orcid.org/0000-0001-5931-183X>), Daniel Oberski [ctb], Jarrett Byrnes [ctb], Leonard Vanbrabant [ctb], Victoria Savalei [ctb], Ed Merkle [ctb], Michael Hallquist [ctb], Mijke Rhemtulla [ctb], Myrsini Katsikatsou [ctb], Mariska Barendse [ctb], Florian Scharf [ctb], Han Du [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.