View source: R/emxMatrixBuilders.R
emxResiduals | R Documentation |
This function creates a factor loadings matrix as an MxMatrix or MxPath object.
emxResiduals(x, values=.2, free=TRUE, lbound=NA, ubound=NA, path=FALSE, type='unique')
x |
character vector. The names of the variables for which residual variances are created. |
values |
numeric vector. The starting values for the variances. |
free |
logical vector. Whether the variances are free. |
lbound |
numeric vector. Lower bounds for the variances. |
ubound |
numeric vector. Upper bounds for the variances. |
path |
logical. Whether to return the MxPath object instead of the MxMatrix. |
type |
character. The kind of residual variance structure to create. See Details. |
Possible values for the type
argument are 'unique' and 'identical'. When type='unique'
, each residual variances is a unique free parameter. When type='identical'
, all of the residual variances are given by a single free parameter. In this case, all the residual variances are constrained to be equal. However, no linear or non-liniear contraint function is used. Rather, a single parameter occurs in multiple locations by using the same label.
Depending on the value of the path
argument, either an MxMatrix or and MxPath object that can be inspected, modified, and/or included in MxModel objects.
emxFactorModel, emxGrowthModel
# Create a residual variance matrix require(EasyMx) manVars <- paste0('x', 1:6) emxResiduals(manVars, lbound=1e-6) emxResiduals(manVars, type='identical') emxResiduals(manVars, path=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.