Skip to contents

This function constructs an OpenMx model for a single family group based on provided relatedness matrices and observed data. The implied covariance is built as a weighted sum of the supplied relatedness matrices, where the weights are variance component parameters shared across groups via a parent ModelOne sub-model.

Usage

buildOneFamilyGroup(
  group_name,
  Addmat = NULL,
  Nucmat = NULL,
  Extmat = NULL,
  Mtdmat = NULL,
  Amimat = NULL,
  Dmgmat = NULL,
  full_df_row,
  ytemp
)

Arguments

group_name

Name of the family group.

Addmat

Additive genetic relatedness matrix (from ped2add).

Nucmat

Nuclear family shared environment relatedness matrix (from ped2cn).

Extmat

Extended family shared environment indicator. When non-NULL, a common-extended-environment term using a unit matrix is included.

Mtdmat

Mitochondrial genetic relatedness matrix (from ped2mit).

Amimat

Additive by mitochondrial interaction relatedness matrix.

Dmgmat

Dominance genetic relatedness matrix.

full_df_row

A 1-row matrix of observed data with column names matching ytemp.

ytemp

A character vector of variable names corresponding to the observed data columns.

Value

An OpenMx model for the specified family group.