MyNixOS website logo
Description

Structural Equation Modeling and Twin Modeling in R.

Quickly create, run, and report structural equation models, and twin models. See '?umx' for help, and umx_open_CRAN_page("umx") for NEWS. 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

Codecov test coverage Github commits cran version Monthly Downloads Total Downloads Rdoc DOI License

Road map, and Tutorials (let me know what you'd like, or perhaps a book?)

umx is a package designed to make structural 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 at tbates.github.io.

umx stands for "user" OpenMx functions. It provides over 100 functions, but most importantly:

  1. umxRAM that makes path-based SEM in R straightforward, with umxSummary and plot for table and graphical display of your models. It can also interpret basic lavaan if you get a script in that language.
  2. 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 (try umxAPA() among other tasks.

Some highlights include:

  1. Building Path Models
    • umxRAM()# Take umxPaths + data data = run and return a model, along with a plot and umxSummary
    • umxPath()# write paths with human-readable language like var = , mean = cov = , fixedAt=. Quickly define a variance and mean ('v.m. = ') and more.
  2. Reporting output
    • umxSummary(model) # Nice summary table, in markdown or browser. Designed for journal reporting (Χ², p, CFI, TLI, & RMSEA). Optionally show path loadings
    • plot(model, std=TRUE, digits = 3, ...) # Graphical model in your browser! or edit in programs like OmniGraffle
    • parameters(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
  3. 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 *
  4. Twin modeling!
    • umxACE# Twin ACE modeling with aplomb paths are labeled! Works with plot() and umxSummary!
    • umxCP, umxIP, umxGxE, umxCP, umxGxEbiv, umxSexLim
    • umxACE
  5. Easy-to-remember options
    • umx_set_cores()
    • umx_set_optimizer()
  6. 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 ?umx and 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
Metadata

Version

4.20.0

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows