powered by
umx_make_twin_data_nice is a function to convert your twin data into a format used across umx. Specifically:
umx_make_twin_data_nice
umx
Existing column for zygosity is renamed to "zygosity".
sep is set to "_T"
sep
The twinID is is set to sequential digits, i.e. 1,2...
umx_make_twin_data_nice( data, sep, zygosity, numbering, labelNumericZygosity = FALSE, levels = 1:5, labels = c("MZFF", "MZMM", "DZFF", "DZMM", "DZOS") )
a data.frame() to check/convert.
data.frame()
existing separator string (will be updated to "_T").
existing zygosity column name (will be renamed zygosity).
zygosity
existing twin sequence string (will be updated to _T1, _T2, _T3).
If TRUE numeric zygosity levels will be set to labels.
legal levels of zygosity (ignored if labelNumericZygosity = FALSE (default 1:5)
labels for each zyg level c("MZFF", "MZMM", "DZFF", "DZMM", "DZOS").
tutorials, tbates/umx
umx_wide2long(), umx_long2wide(),
umx_wide2long()
umx_long2wide()
Other Twin Data functions: umx_long2wide(), umx_make_TwinData(), umx_residualize(), umx_scale_wide_twin_data(), umx_wide2long(), umx
umx_make_TwinData()
umx_residualize()
umx_scale_wide_twin_data()
# NOT RUN { data(twinData) tmp = twinData tmp$zygosity=NULL tmp = umx_make_twin_data_nice(twinData, sep="", numbering = 1:5, zyg="zygosity") namez(tmp, "zyg") levels(tmp$zygosity) # }
Run the code above in your browser using DataLab