powered by
Replaces NAs in definition slots with the mean for that variable ONLY where all data are missing for that twin
umxPadAndPruneForDefVars(df, varNames, defNames, suffixes, highDefValue = 99, rm = c("drop_missing_def", "pad_with_mean"))
the dataframe to process
list of names of the variables being analysed
list of covariates
suffixes that map names on columns in df (i.e., c("T1", "T2"))
What to replace missing definition variables (covariates) with. Default = 99
= how to handle missing values in the varNames. Default is "drop_missing_def", "pad_with_mean")
- dataframes
- http://tbates.github.io, https://github.com/tbates/umx
Other Data Functions: umxCovData, umxFactor, umxHetCor, umx_as_numeric, umx_cont_2_quantiles, umx_cov2raw, umx_long2wide, umx_lower2full, umx_make_MR_data, umx_make_TwinData, umx_make_bin_cont_pair_data, umx_make_fake_data, umx_merge_CIs, umx_read_lower, umx_reorder, umx_residualize, umx_round, umx_scale_wide_twin_data, umx_scale, umx_swap_a_block, umx_wide2long, umx
umxCovData
umxFactor
umxHetCor
umx_as_numeric
umx_cont_2_quantiles
umx_cov2raw
umx_long2wide
umx_lower2full
umx_make_MR_data
umx_make_TwinData
umx_make_bin_cont_pair_data
umx_make_fake_data
umx_merge_CIs
umx_read_lower
umx_reorder
umx_residualize
umx_round
umx_scale_wide_twin_data
umx_scale
umx_swap_a_block
umx_wide2long
umx
# NOT RUN { df = umxPadAndPruneForDefVars(df, "E", "age", c("_T1", "_T2")) # }
Run the code above in your browser using DataLab