umx (version 1.9.1)

xmu_check_levels_identical: xmu_check_levels_identical

Description

Just checks that the factor levels for twins 1 and 2 are the same

Usage

xmu_check_levels_identical(df, selDVs, sep, action = c("stop", "ignore"))

Arguments

df

data.frame containing the data

selDVs

base names of variables (without suffixes)

sep

text-constant separating base variable names the twin index (1:2)

action

if unequal levels found: c("stop", "ignore")

Value

-

See Also

Other xmu internal not for end user: umxModel, xmuHasSquareBrackets, xmuLabel_MATRIX_Model, xmuLabel_Matrix, xmuLabel_RAM_Model, xmuMI, xmuMakeDeviationThresholdsMatrices, xmuMakeOneHeadedPathsFromPathList, xmuMakeTwoHeadedPathsFromPathList, xmuMaxLevels, xmuMinLevels, xmuPropagateLabels, xmu_dot_make_paths, xmu_dot_make_residuals, xmu_start_value_list

Examples

Run this code
# NOT RUN {
require(umx)
data(twinData)
baseNames = c("bmi")
selDVs = umx_paste_names(baseNames, "", 1:2)
tmp = twinData[, selDVs]
tmp$bmi1[tmp$bmi1 <= 22] = 22
tmp$bmi2[tmp$bmi2 <= 22] = 22
xmu_check_levels_identical(umxFactor(tmp, sep = ""), selDVs = baseNames, sep = "")
# }
# NOT RUN {
xmu_check_levels_identical(umxFactor(tmp), selDVs = baseNames, sep = "")
# }

Run the code above in your browser using DataCamp Workspace