| umx_wide4lmer | R Documentation |
umx_wide4lmer Transform data from wide to long format for repeated measures and multi-level modeling in R.
Wraps reshape stats::reshape()
umx_wide4lmer(
repeated = list(y = c("y1", "y2")),
timevar = list(cond = c("cont", "expt")),
covs = c("Age", "Sex", "Conscientiousness"),
data = df,
idvar = "PID"
)
repeated |
list of repeated measures each in list(y = c("y1", "y2")) form |
timevar |
list of conditions in a list, e.g., list(condition = c("cont", "expt")), |
covs |
vector of covariates e.g., c("Age", "Sex", "Conscientiousness") |
data |
A (long-format) data file |
idvar |
The variable which links repeated measures, e.g., "ID" |
umx_long2wide()
Other Miscellaneous Utility Functions:
install.OpenMx(),
libs(),
qm(),
umx,
umxLav2RAM(),
umxModelNames(),
umxRAM2Lav(),
umxVersion(),
umx_array_shift(),
umx_find_object(),
umx_lower.tri(),
umx_msg(),
umx_open_CRAN_page(),
umx_pad(),
umx_print(),
umx_wide2long()
## Not run:
covs = c("Age", "Sex", "Conscientiousness")
timevar = list(Difficulty = c("short", "long"))
repeated = list(
Frustration = c("NASA_Frustration1", "NASA_Frustration2"),
Effort = c("NASA_Effort1" , "NASA_Effort2"),
Efficacy = c("NASA_Performance1", "NASA_Performance2"),
Howmany = c("howmany_30secs" , "howmany_60secs")
)
df.l = umx_wide4lmer(repeated = repeated, timevar = timevar, covs = covs, data = df, idvar = "PID")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.