View source: R/emxBehaviorGenetics.R

emxKroneckerVariance | R Documentation |

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

emxKroneckerVariance(h, v, name)

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

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.

MxAlgebra

emxRelatednessMatrix

# 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')

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.