- Notifications
You must be signed in to change notification settings - Fork18
Making Structural Equation Modeling (SEM) in R quick & powerful
tbates/umx
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Road map, andTutorials (let me know what you'd like, or perhaps a book?)
umx is a package designed to makestructural equation modeling easier, from building, to modifying and reporting.
citation("umx")
You should cite: Timothy C. Bates, Michael C. Neale, Hermine H. Maes, (2019). umx: A library for Structural Equation and Twin Modelling in R.Twin Research and Human Genetics,22, 27-41.DOI:10.1017/thg.2019.2
umx includes high-level functions for complex models such as multi-group twin models, as well as graphical model output.
Install it from CRAN:
install.packages("umx")library(umx)?umx
Most functions have extensive and practical examples (even figures for the twin models): so USE THE HELP :-).
See what is on offer with '?umx'. There are online tutorials attbates.github.io.
umx stands for "user" OpenMx functions. It provides over 100 functions, but most importantly:
umxRAMthat makes path-based SEM in R straightforward, withumxSummaryandplotfor table and graphical display of your models. It can also interpret basic lavaan if you get a script in that language.- A suite of twin modelling functions, such as
umxACE.
These are supported by many low-level functions automating activities such as parameter labels, start values etc., as well as helping with data-wrangling, journal-ready presentation (tryumxAPA() among other tasks.
Some highlights include:
- Building Path Models
umxRAM()# Take umxPaths + datadata =run and return a model, along with aplotandumxSummaryumxPath()# write paths with human-readable language likevar =,mean =cov =,fixedAt=. Quickly define a variance and mean ('v.m. = ') and more.
- Reporting output
umxSummary(model)#Nice summary table, in markdown or browser. Designed for journal reporting (Χ², p, CFI, TLI, & RMSEA). Optionally show path loadingsplot(model, std=TRUE, digits = 3, ...)#Graphical model in your browser! or edit in programs like OmniGraffleparameters(m1, "below", .1, pattern="_to_"))# A powerful assistant to get labels and values from a model (e.g. all 'to' params, below .1 in value)residuals(m1, supp=.1)# Show residual covariances filtered for magnitude
- Modify models
umxModify(model, update = )*# Modify and re-run a model. You can add objects, drop or add paths, including by wildcard label matching), re-name the model, and even return the comparison. All in 1 line *
- Twin modeling!
- Easy-to-remember options
umx_set_cores()umx_set_optimizer()
- Many more miscellaneous helpers e.g.
umx_time(model1, model2)reports and compares run times in a compact programmable format (also "start" and "stop" a timer)umxHetcor(data, use = "pairwise.complete.obs")# Compute appropriate pair-wise correlations for mixed data types.- Dozens more: Check out the "family links" in
?umxand in any help file!
Code and requests welcome via Github. Tell your friends! Publish good science :-)
For thrill-seekers and collaborators only: the bleeding-edge development version is here:
install.packages("devtools")library("devtools")install_github("tbates/umx")library("umx")?umx
About
Making Structural Equation Modeling (SEM) in R quick & powerful
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors7
Uh oh!
There was an error while loading.Please reload this page.
