This function constructs and fits an OpenMx model for a pedigree using specified variance components and family group models.
Usage
fitPedigreeModel(
model_name = "PedigreeModel",
vars = list(ad2 = 0.5, dd2 = 0.3, cn2 = 0.2, ce2 = 0.4, mt2 = 0.1, am2 = 0.25, ee2 =
0.6),
data = NULL,
group_models = NULL,
tryhard = TRUE,
Addmat = NULL,
Nucmat = NULL,
Extmat = NULL,
Mtdmat = NULL,
Amimat = NULL,
Dmgmat = NULL
)Arguments
- model_name
Character. Name for the overall OpenMx model. Default is "PedigreeModel".
- vars
A named list or vector of initial variance component values.
- data
A matrix or data frame of observed data, where each row is a family and columns correspond to individuals. Only used when
group_modelsis NULL.- group_models
Optional list of pre-built OpenMx family group models (from
buildOneFamilyGroup). If NULL, they are generated fromdatausing the provided relatedness matrices.- tryhard
Logical. If TRUE (default), use
mxTryHardfor robust optimization; if FALSE, usemxRun.- Addmat
Additive genetic relatedness matrix. Required when
group_modelsis NULL.- Nucmat
Common nuclear environment relatedness matrix. Optional.
- Extmat
Common extended environment relatedness matrix. Optional.
- Mtdmat
Mitochondrial relatedness matrix. Optional.
- Amimat
Additive-by-mitochondrial interaction matrix. Optional.
- Dmgmat
Dominance genetic relatedness matrix. Optional.