Make a 2-group Independent Pathway twin model (Common-factor independent-pathway multivariate model)
The following figure shows the IP model diagramatically:
umxIP(name = "IP", selDVs, dzData, mzData, suffix = NULL, nFac = 1,
freeLowerA = FALSE, freeLowerC = FALSE, freeLowerE = FALSE,
equateMeans = TRUE, dzAr = 0.5, dzCr = 1, correlatedA = FALSE,
addStd = TRUE, addCI = TRUE, numObsDZ = NULL, numObsMZ = NULL,
autoRun = getOption("umx_auto_run"), sep = NULL)
The name of the model (defaults to "IP")
The variables to include
The DZ dataframe
The MZ dataframe
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")
How many common factors (default = 1)
Whether to leave the lower triangle of A free (default = F)
Whether to leave the lower triangle of C free (default = F)
Whether to leave the lower triangle of E free (default = F)
Whether to equate the means across twins (defaults to T)
The DZ genetic correlation (defaults to .5, vary to examine assortative mating)
The DZ "C" correlation (defaults to 1: set to .25 to make an ADE model)
Whether factors are allowed to correlate (not implemented yet: FALSE)
Whether to add the algebras to compute a std model (defaults to TRUE)
Whether to add the interval requests for CIs (defaults to TRUE)
= todo: implement ordinal Number of DZ twins: Set this if you input covariance data
= todo: implement ordinal Number of MZ twins: Set this if you input covariance data
Whether to mxRun the model (default TRUE: the estimated model will be returned)
allowed as a synonym for "suffix"
- mxModel
- plot()
, umxSummary()
work for IP, CP, GxE, SAT, and ACE models.
Other Twin Modeling Functions: plot.MxModel
,
umxACESexLim
, umxACEcov
,
umxACE
, umxCF_SexLim
,
umxCP
, umxGxE_window
,
umxGxE
, umxPlotACEcov
,
umxPlotCP
, umxPlotGxE
,
umxPlotIP
, umxSummaryACEcov
,
umxSummaryACE
, umxSummaryCP
,
umxSummaryGxE
, umxSummaryIP
,
umx
# NOT RUN {
require(umx)
data(twinData)
zygList = c("MZFF", "MZMM", "DZFF", "DZMM", "DZOS")
twinData$ZYG = factor(twinData$zyg, levels = 1:5, labels = zygList)
mzData <- subset(twinData, ZYG == "MZFF")
dzData <- subset(twinData, ZYG == "DZFF")
selDVs = c("ht", "wt") # These will be expanded into "ht1" "ht2"
m1 = umxIP(selDVs = selDVs, suffix = "", dzData = dzData, mzData = mzData)
umxSummary(m1)
plot(m1)
# }
Run the code above in your browser using DataLab