Method 1: Use complete suffixes
You can provide complete suffixes like "_T1" and "_T2". This has the benefit of being explicit
and very general:
umx_paste_names(c("var1", "var2"), suffixes = c("_T1", "_T2"))
Method 2: Use sep and a suffix vector
Alternatively, you can use sep
to add a constant like "_T" after each basename, along
with a vector of suffixes. This has the benefit of showing what is varying:
This is then suffixed with e.g. "1", "2".
umx_paste_names(c("var1", "var2"), sep = "_T", suffixes = 1:2)
Working with covariates
If you are using umxACEcov
, you need to keep all the covariates at the end of the list.
Here's how:
umx_paste_names(c("var1", "var2"), cov = c("cov1"), sep = "_T", suffixes = 1:2)
note: in conventional twin models, the expCov matrix is T1 vars, followed by T2 vars. For covariates, you want
T1vars, T2 vars, T1 covs, T2 covs. This is what covNames
accomplishes.