emxFactorModel: Create a factor model

View source: R/emxModelBuilders.R

emxFactorModelR Documentation

Create a factor model

Description

This function creates a factor model as an MxModel object.

Usage

emxFactorModel(model, data, name, run=FALSE, identification, use, ordinal,
    ..., parameterization=c("lisrel", "ifa"), weight = as.character(NA))
emxModelFactor(model, data, name, run=FALSE, identification, use, ordinal,
    ..., parameterization=c("lisrel", "ifa"), weight = as.character(NA))

Arguments

model

named list. Gives the factor loading pattern. See Details.

data

data used for the model

name

character. Optional name of the model created.

run

logical. Whether to run the model before returning.

identification

Not yet implemented. How the model is identified. Currently ignored.

use

character vector. The names of the variables to use.

ordinal

character vector. The names of the ordinal variables.

...

Force later arguments to be named. ... is ignored.

parameterization

character. Whether to specify the model as a LISREL SEM or as an Item Factor Analysis

weight

character. Name of the data column used for sample weights.

Details

The model argument must be a named list. The names of the list give the names of the latent variables. Each list element gives the names of the variables that load onto that latent variable. This may sound complicated, but the example below makes this more clear. It is intended to be visually intuitive.

Value

An MxModel.

See Also

emxLoadings

Examples

   
# Example
require(EasyMx)
data(myFADataRaw)
xmap <- list(F1=paste0('x', 1:6), F2=paste0('y', 1:3), F3=paste0('z', 1:3))
## Not run: 
mod <- emxFactorModel(xmap, data=myFADataRaw, run=TRUE)

## End(Not run)


EasyMx documentation built on Feb. 16, 2023, 7:27 p.m.