ramModel: Construct SEM model using RAM matrix specification.

View source: R/ramModel.R

ramModelR Documentation

Construct SEM model using RAM matrix specification.

Description

This function creates a 'semPlotModel' object using matrices of the RAM model (McArdle & McDonald, 1984).

Usage

ramModel(A, S, F, M, manNames, latNames, Names, ObsCovs, ImpCovs, modelLabels = FALSE)

Arguments

A

Specification of the assymmetric (A) matrix, see details.

S

Specification of the symmetric (S) matrix, see details.

F

Specification of the filter (F) matrix, see details.

M

Specification of the means (M) vector, see details.

manNames

Character vector of the manifest names.

latNames

Character vector of the latent names.

Names

Character vector containing all names. Defaults to c(manNames,latNames).

ObsCovs

Observed covariancem matrix.

ImpCovs

Implied covariancem matrix.

modelLabels

Logical. If TRUE all latents are named l1, l2, ... and all manifests m1, m2, ...

Details

The matrices can be assigned in various ways, depending on the amount of information that should be stored in the resulting model.

First, the a single matrix can be used. The values of this matrix correspond to the parameter estimates in the 'semPlotModel'. For multiple groups, a list of such matrices can be used.

to store more information, a named list of multiple matrices of the same dimensions can be used. Included in this list can be the following (but only estimates is nessesary):

est

Parameter estimates

std

standardized parameter estimates

par

Parameter numbers. 0 indicating fixed variables and parameters with the same parameter number are constrained to be equal.

fixed

Logical matrix indicating if the parameter is fixed.

If std is missing the function tries to compute standardized solutions (not yet working for intercepts). If fixed is missing it is computed from the par matrix. For multiple groups, a list containing such lists can be used.

The number of variables is extracted from the assigned matrices.

Value

A 'semPlotModel' object.

Author(s)

Sacha Epskamp <mail@sachaepskamp.com>

References

McArdle, J. J., & McDonald, R. P. (1984). Some algebraic properties of the reticular action model for moment structures. British Journal of Mathematical and Statistical Psychology, 37(2), 234-251.

See Also

semPlotModel semCors semPaths lisrelModel


semPlot documentation built on Aug. 10, 2022, 9:06 a.m.