Learn R Programming

umx (version 1.9.1)

umxACESexLim: umxACESexLim: Build and run a sex-limitation twin model (not working yet)

Description

Cholesky style sex-limitation model.

Usage

umxACESexLim(name = "ACE_sexlim", selDVs, mzmData, dzmData, mzfData, dzfData,
  dzoData, suffix = NULL, autoRun = getOption("umx_auto_run"))

Arguments

name

The name of the model (defaults to "ACE_sexlim")

selDVs

The variables to include. If you provide a suffix, you can use just the base names.

mzmData

The MZ male dataframe

dzmData

The DZ male dataframe

mzfData

The DZ female dataframe

dzfData

The DZ female dataframe

dzoData

The DZ opposite-sex dataframe. (be sure and get in right order)

suffix

The suffix for twin 1 and twin 2, often "_T". If set, you can omit suffixes in selDVs, i.e., just "dep" not c("dep_T1", "dep_T2")

autoRun

Whether to mxRun the model (default TRUE: the estimated model will be returned)

Value

- ACE sexlim model

Details

This is a multi-variate capable Quantitative & Qualitative Sex-Limitation script using ACE Cholesky modeling. It implements a correlation approach to ensure that order of variables does NOT affect ability of model to account for DZOS data.

Restrictions include the assumption that twin means and variances can be equated across birth order within zygosity groups.

Note: Qualitative sex differences are differences in the latent A, C, or E latent variables Note: Quantitative sex differences are differences in the path loadings from A, C, or E to the measured variables

References

- Neale et al., (2006). Multivariate genetic analysis of sex-lim and GxE interaction, Twin Research & Human Genetics., https://github.com/tbates/umx, https://tbates.github.io

See Also

Other Twin Modeling Functions: plot.MxModel, umxACE_cov_fixed, umxACEcov, umxACEv, umxACE, umxCF_SexLim, umxCP, umxGxE_window, umxGxE, umxIP, umxPlotACEcov, umxPlotCP, umxPlotGxE, umxPlotIP, umxReduceACE, umxSummaryACEcov, umxSummaryACEv, umxSummaryACE, umxSummaryCP, umxSummaryGxE, umxSummaryIP, umx_long2wide, umx_wide2long, umx, xmu_twin_check

Examples

Run this code
# NOT RUN {
# Load Libraries
require(umx);
# =========================
# = Load and Process Data =
# =========================
data('us_skinfold_data')
# rescale variables
us_skinfold_data[,c('bic_T1', 'bic_T2')] <- us_skinfold_data[,c('bic_T1', 'bic_T2')]/3.4
us_skinfold_data[,c('tri_T1', 'tri_T2')] <- us_skinfold_data[,c('tri_T1', 'tri_T2')]/3
us_skinfold_data[,c('caf_T1', 'caf_T2')] <- us_skinfold_data[,c('caf_T1', 'caf_T2')]/3
us_skinfold_data[,c('ssc_T1', 'ssc_T2')] <- us_skinfold_data[,c('ssc_T1', 'ssc_T2')]/5
us_skinfold_data[,c('sil_T1', 'sil_T2')] <- us_skinfold_data[,c('sil_T1', 'sil_T2')]/5

# Select Variables for Analysis
varList = c('ssc','sil','caf','tri','bic')
selVars = umx_paste_names(varList, "_T", 1:2)

# Data objects for Multiple Groups
mzmData = subset(us_skinfold_data, zyg == 1, selVars)
dzmData = subset(us_skinfold_data, zyg == 3, selVars)
mzfData = subset(us_skinfold_data, zyg == 2, selVars)
dzfData = subset(us_skinfold_data, zyg == 4, selVars)
dzoData = subset(us_skinfold_data, zyg == 5, selVars)

m1 = umxACESexLim(selDVs = varList, suffix = "_T",
       mzmData = mzmData, dzmData = dzmData, 
       mzfData = mzfData, dzfData = dzfData, 
       dzoData = dzoData)
m1 = mxRun(m1)
# ===================================================
# = Test switching specific a from Males to females =
# ===================================================
m2 = umxSetParameters(m1, labels = "asm_.*", free = FALSE, values = 0, regex = TRUE)
m2 = umxSetParameters(m1, labels = "asf_.*", free = TRUE , values = 0, regex = TRUE)
m2 = mxRun(m2)
summary(m2)
umxCompare(m2, m1)
# does fit move on repeated execution?
# for (i in 1:4) { m2 <- mxRun(m2); print(m2 $output$mi) }
# }

Run the code above in your browser using DataLab