Package: umg 0.6.1

umg: Unified Model Graphs for Statistical Models in Psychology

Constructs, validates, lays out, and renders Unified Model Graphs (UMG), a formal graphical grammar for statistical models in psychology. Vertices are typed by observability, support, and inferential role; edges distinguish stochastic, symmetric, deterministic, and mixing dependence; plates encode replication and hierarchy. Diagrams can be themed and rendered with base 'grid' graphics, with 'ggplot2', as 'TikZ' code, or as 'Graphviz' DOT, and can be constructed either from one-line motif builders for many model families or automatically from 'lavaan', 'lme4', 'mirt', 'blavaan', 'brms', 'OpenMx', and 'qgraph' model objects. A diagram can be inspected as a data frame, summarised, and exported back to 'lavaan' model syntax, making the model-diagram correspondence operational in both directions. Each diagram also exposes identification diagnostics (scaling checks, a graphical counting rule, and a d-separation reader) and generates the exploratory display scaffolds implied by the model-data duality. The notation builds on established results for graphical and structural equation models: plate notation follows Buntine (1994) <doi:10.1613/jair.62>; the counting rule and scaling checks follow Bollen (1989) <doi:10.1002/9781118619179>; and the independence reader implements the d-separation criterion of Geiger, Verma and Pearl (1990) <doi:10.1002/net.3230200504> through the equivalent ancestral graph criterion of Lauritzen, Dawid, Larsen and Leimer (1990) <doi:10.1002/net.3230200503>.

Authors:Hsiu-Ting Yu [aut, cre]

umg_0.6.1.tar.gz
umg_0.6.1.zip(r-4.7-any)umg_0.6.1.zip(r-4.6-any)umg_0.6.1.zip(r-4.5-any)
umg_0.6.1.tgz(r-4.6-any)umg_0.6.1.tgz(r-4.5-any)
umg_0.6.1.tar.gz(r-4.7-any)umg_0.6.1.tar.gz(r-4.6-any)
umg_0.6.1.tgz(r-4.6-emscripten)
manual.pdf |manual.html✨
DESCRIPTION |NEWS
card.svg |card.png
umg/json (API)

# Install 'umg' in R:
install.packages('umg', repos = c('https://hsiutingyu.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/hsiutingyu/umg/issues

Pkgdown/docs site:https://hsiutingyu.github.io

On CRAN:

Conda:

5.02 score 10 scripts 43 exports 0 dependencies

Last updated from:15f0570b20. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-develOK179
source / vignettesOK462
linux-releaseOK164
macos-releaseOK171
macos-oldrelOK205
windows-develOK131
windows-releaseOK97
windows-oldrelOK131
wasm-releaseOK146

Exports:umg_bifactorumg_caterpillarumg_check_scalingumg_count_parametersumg_dcmumg_dsepumg_eda_scaffoldumg_edgeumg_esemumg_factorumg_formativeumg_from_blavaanumg_from_brmsumg_from_lavaanumg_from_lmerumg_from_mirtumg_from_OpenMxumg_from_qgraphumg_ggplotumg_growthumg_identifyumg_implied_ciumg_irtumg_labelswitchingumg_layoutumg_lcaumg_mediationumg_mimicumg_mixtureumg_modelumg_networkumg_nodeumg_plateumg_render_dotumg_riclpmumg_saveumg_secondorderumg_semumg_themeumg_to_dotumg_to_lavaanumg_to_tikzumg_validate

Dependencies:

A Gallery of Model Families in the UMG Grammar
Measurement models | Reflective factor (CFA) | Bifactor | Second-order factor | Exploratory SEM (full cross-loadings) | Formative measurement and MIMIC | Item response models | Hierarchy, growth, and longitudinal models | Mixtures | Networks | General SEM assembler | Causal license: the badge

Last update: 2026-08-29
Started: 2026-08-29

Reading Identification off the Diagram
Scaling marks for latent variables | The counting rule | Label switching | Conditional independence and d-separation | A single summary

Last update: 2026-08-29
Started: 2026-08-29

Unified Model Graphs: An Introduction
The grammar in one paragraph | Building a one-factor model by hand | From a lavaan model | From an lme4 formula | TikZ export | Model-data duality | Inspecting a diagram as data | Round-tripping to lavaan

Last update: 2026-08-29
Started: 2026-08-29

Readme and manuals

Help Manual

Help pageTopics
Coerce a UMG to a data frameas.data.frame.umg
Plot a UMG with grid graphicsplot.umg
Print a Unified Model Graphprint.umg
Print a UMG identification summaryprint.umg_identification
Summarise a UMGprint.summary.umg summary.umg
Bifactor measurement motifumg_bifactor
Caterpillar (shrinkage) plot of cluster-level estimatesumg_caterpillar
Check latent-variable scaling marksumg_check_scaling
Graphical parameter count (t-rule)umg_count_parameters
Diagnostic classification model (DCM) motifumg_dcm
Test d-separation in a UMGumg_dsep
Generate exploratory display scaffolds from a UMGumg_eda_scaffold
Create a UMG edgeumg_edge
Exploratory structural equation model motifumg_esem
Reflective factor (measurement) motifumg_factor
Formative (composite) measurement motifumg_formative
Build a UMG from a blavaan modelumg_from_blavaan
Build a UMG from a brms modelumg_from_brms
Build a UMG from a lavaan modelumg_from_lavaan
Build a UMG from an lme4 formulaumg_from_lmer
Build a UMG from a fitted mirt modelumg_from_mirt
Build a UMG from an OpenMx RAM modelumg_from_OpenMx
Build a UMG from a qgraph object or weighted adjacency matrixumg_from_qgraph
Render a UMG with ggplot2autoplot.umg umg_ggplot
Latent growth-curve motifumg_growth
Identification summary for a UMGumg_identify
Enumerate basis-set implied conditional independenciesumg_implied_ci
Item response theory motif (crossed persons x items)umg_irt
Flag label-switching symmetry in mixturesumg_labelswitching
Compute a layered layout for a UMGumg_layout
Latent class motifumg_lca
Mediation motifumg_mediation
MIMIC (multiple-indicator multiple-cause) motifumg_mimic
Add a finite-mixture wrapper to an existing UMGumg_mixture
Assemble and validate a Unified Model Graphumg_model
Undirected network (Gaussian graphical model) motifumg_network
Create a UMG vertexumg_node
Create a UMG plateumg_plate
Render a UMG through DiagrammeR (Graphviz)umg_render_dot
Random-intercept cross-lagged panel model (RI-CLPM) motifumg_riclpm
Save a UMG diagram to a fileumg_save
Second-order factor motifumg_secondorder
General structural equation model builderumg_sem
Construct a UMG rendering themeumg_theme
Export a UMG as Graphviz DOT codeumg_to_dot
Generate lavaan model syntax from a UMGumg_to_lavaan
Export a UMG as TikZ codeumg_to_tikz
Validate well-formedness of a UMGumg_validate