emxGeneticFactorVariance: Creates a variance matrix accoring to the Genetic Factor...

View source: R/emxBehaviorGenetics.R

emxGeneticFactorVarianceR Documentation

Creates a variance matrix accoring to the Genetic Factor Model

Description

This function creates a variance matrix according to the genetic factor model

Usage

emxGeneticFactorVariance(x, name, values=.8, free=TRUE, lbound=NA, ubound=NA)

Arguments

x

character vector. The names of the variables used for the matrix.

name

character. The name of the variance matrix created.

values

numeric vector. The starting values for the lower triangular matrix.

free

logical vector. Whether the lower triangular elements are free.

lbound

numeric vector. Lower bounds on free parameters.

ubound

numeric vector. Upper bounds on free parameters.

Value

A list with two components. The first component is the factor loadings matrix. The second component is an MxAlgebra, the result of which is the variance matrix implied by the factor loadings.

See Also

emxCholeskyVariance

Examples

   
# Create a genetic factor variance matrix
require(EasyMx)
xvars <- paste0('x', 1:2)
emxGeneticFactorVariance(xvars, 'D')


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