View source: R/xmu_make_top_twin_models.R
xmuTwinUpgradeMeansToCovariateModel | R Documentation |
Does the following to model
(i.e., a umx top/MZ/DZ supermodel):
Change top.expMeans
to top.intercept
.
Create top.meansBetas
for beta weights in rows (of covariates) and columns for each variable.
Add matrices for each twin's data.cov vars (matrixes are called T1DefVars
).
Switch mxExpectationNormal
in each data group to point to the local expMean
.
Add "expMean" algebra to each data group.
grp.expMean
sums top.intercept
and grp.DefVars %*% top.meansBetas
for each twin.
xmuTwinUpgradeMeansToCovariateModel(model, fullVars, fullCovs, nSib, sep)
model |
The |
fullVars |
the FULL names of manifest variables |
fullCovs |
the FULL names of definition variables |
nSib |
How many siblings |
sep |
How twin variable names have been expanded, e.g. "_T". |
In umx models with no covariates, means live in top$expMean
model, now with means model extended to covariates.
called by xmuTwinSuper_Continuous()
Other xmu internal not for end user:
umxModel()
,
umxRenameMatrix()
,
umx_APA_pval()
,
umx_fun_mean_sd()
,
umx_get_bracket_addresses()
,
umx_make()
,
umx_standardize()
,
umx_string_to_algebra()
,
xmuHasSquareBrackets()
,
xmuLabel_MATRIX_Model()
,
xmuLabel_Matrix()
,
xmuLabel_RAM_Model()
,
xmuMI()
,
xmuMakeDeviationThresholdsMatrices()
,
xmuMakeOneHeadedPathsFromPathList()
,
xmuMakeTwoHeadedPathsFromPathList()
,
xmuMaxLevels()
,
xmuMinLevels()
,
xmuPropagateLabels()
,
xmuRAM2Ordinal()
,
xmuTwinSuper_Continuous()
,
xmuTwinSuper_NoBinary()
,
xmu_CI_merge()
,
xmu_CI_stash()
,
xmu_DF_to_mxData_TypeCov()
,
xmu_PadAndPruneForDefVars()
,
xmu_bracket_address2rclabel()
,
xmu_cell_is_on()
,
xmu_check_levels_identical()
,
xmu_check_needs_means()
,
xmu_check_variance()
,
xmu_clean_label()
,
xmu_data_missing()
,
xmu_data_swap_a_block()
,
xmu_describe_data_WLS()
,
xmu_dot_make_paths()
,
xmu_dot_make_residuals()
,
xmu_dot_maker()
,
xmu_dot_move_ranks()
,
xmu_dot_rank_str()
,
xmu_extract_column()
,
xmu_get_CI()
,
xmu_lavaan_process_group()
,
xmu_make_TwinSuperModel()
,
xmu_make_bin_cont_pair_data()
,
xmu_make_mxData()
,
xmu_match.arg()
,
xmu_name_from_lavaan_str()
,
xmu_path2twin()
,
xmu_path_regex()
,
xmu_print_algebras()
,
xmu_rclabel_2_bracket_address()
,
xmu_relevel_factors()
,
xmu_safe_run_summary()
,
xmu_set_sep_from_suffix()
,
xmu_show_fit_or_comparison()
,
xmu_simplex_corner()
,
xmu_standardize_ACE()
,
xmu_standardize_ACEcov()
,
xmu_standardize_ACEv()
,
xmu_standardize_CP()
,
xmu_standardize_IP()
,
xmu_standardize_RAM()
,
xmu_standardize_SexLim()
,
xmu_standardize_Simplex()
,
xmu_start_value_list()
,
xmu_starts()
,
xmu_summary_RAM_group_parameters()
,
xmu_twin_add_WeightMatrices()
,
xmu_twin_check()
,
xmu_twin_get_var_names()
,
xmu_twin_make_def_means_mats_and_alg()
,
xmu_twin_upgrade_selDvs2SelVars()
## Not run:
data(twinData) # ?twinData from Australian twins.
twinData[, c("ht1", "ht2")] = twinData[, c("ht1", "ht2")] * 10
mzData = twinData[twinData$zygosity %in% "MZFF", ]
dzData = twinData[twinData$zygosity %in% "DZFF", ]
# m1 = umxACE(selDVs= "ht", sep= "", dzData= dzData, mzData= mzData, autoRun= FALSE)
# m2 = xmuTwinUpgradeMeansToCovariateModel(m1, fullVars = c("ht1", "ht2"),
# fullCovs = c("age1", "sex1", "age2", "sex2"), sep = "")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.