emxFactorModel: Create a factor model

Description Usage Arguments Details Value See Also Examples

View source: R/emxModelBuilders.R

Description

This function creates a factor model as an MxModel object.

Usage

1
2
emxFactorModel(model, data, name, run=FALSE, identification, use, ordinal)
emxModelFactor(model, data, name, run=FALSE, identification, use, ordinal)

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

use

character vector. The names of the variables to use.

ordinal

character vector. The names of the ordinal variables.

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

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

jpritikin/emx documentation built on May 19, 2019, 11:50 p.m.