emxKroneckerVariance: Creates a large Variance matrix by Kroneckering two smaller...

View source: R/emxBehaviorGenetics.R

emxKroneckerVarianceR Documentation

Creates a large Variance matrix by Kroneckering two smaller matrices

Description

This function creates the wide format variance matrix when combined with a relatedness matrix

Usage

emxKroneckerVariance(h, v, name)

Arguments

h

MxMatrix. Left hand side of the Kronecker product. Typically the relatedness matrix.

v

MxMatrix. Right hand side of the Kronecker product. Typically the variance matrix.

name

character. Name of the resulting large matrix.

Details

In many behavior genetic models, a relationship matrix is combined with a base variance matrix. The combination is done with a Kronecker product so that the variance exists (possibly weighted by zero or another number) for each member of the relationship.

Value

MxAlgebra

See Also

emxRelatednessMatrix

Examples

   
# Create a loadings matrix
require(EasyMx)
x <- letters[23:26]
amat <- emxCholeskyVariance(x, 'A')
ahmat <- emxRelatednessMatrix(2, c(1, .5, 1), name='AH')
ab <- emxKroneckerVariance(ahmat, amat[[2]], 'AB')


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