powered by
Scale wide data across all twins. You offer up a list of variables to scale, e.g. c("DEP", "bmi") and the separator (e.g. sep = "_T") and twin suffixes e.g. 1:2 that paste together to make complete variable names: e.g. "DEP_T1" and "DEP_T2".
sep = "_T"
umx_scale_wide_twin_data(varsToScale, sep, data, twins = 1:2)
The base names of the variables ("weight" etc.)
The suffix that distinguishes each case, e.g. "_T")
A wide dataframe
Legal digits following sep (default 1:2)
dataframe with varsToScale standardized
https://github.com/tbates/umx
umx_scale
Other Twin Data functions: umx_long2wide(), umx_make_TwinData(), umx_make_twin_data_nice(), umx_residualize(), umx_wide2long(), umx
umx_long2wide()
umx_make_TwinData()
umx_make_twin_data_nice()
umx_residualize()
umx_wide2long()
umx
# NOT RUN { data(twinData) df = umx_scale_wide_twin_data(data = twinData, varsToScale = c("ht", "wt"), sep = "") plot(wt1 ~ wt2, data = df) # }
Run the code above in your browser using DataLab