Package: mlstats 0.1.0.9000

mlstats: Multilevel Descriptive Statistics and Data Preparation

Provides tools for multilevel descriptive statistics and data preparation. Computes within-group and between-group correlations (via variance decomposition or two-level structural equation modeling), intraclass correlation coefficients (ICCs), and descriptive statistics for nested data (e.g., repeated measurements per person), supporting both frequentist (via 'lme4' or 'lavaan') and Bayesian (via 'brms') estimation. Results are formatted according to APA standards and can be exported as tables using 'gt' or 'tinytable'. Also includes functions for decomposing variables into within-group and between-group components for use in Random Effects Within-Between (REWB) models.

Authors:Felix Dietrich [aut, cre, cph]

mlstats_0.1.0.9000.tar.gz
mlstats_0.1.0.9000.zip(r-4.7)mlstats_0.1.0.9000.zip(r-4.6)mlstats_0.1.0.9000.zip(r-4.5)
mlstats_0.1.0.9000.tgz(r-4.6-any)mlstats_0.1.0.9000.tgz(r-4.5-any)
mlstats_0.1.0.9000.tar.gz(r-4.7-any)mlstats_0.1.0.9000.tar.gz(r-4.6-any)
mlstats_0.1.0.9000.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
mlstats/json (API)

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

Bug tracker:https://github.com/felixdidi/mlstats/issues

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

Datasets:
  • media_diary - Simulated daily diary study: entertainment media use and wellbeing

On CRAN:

Conda:

6.18 score 12 stars 7 scripts 3 exports 36 dependencies

Last updated from:f25d3806d1. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK440
source / vignettesOK267
linux-release-x86_64OK383
macos-release-arm64OK424
macos-oldrel-arm64OK430
windows-develOK401
windows-releaseOK418
windows-oldrelOK428
wasm-releaseOK155

Exports:decompose_within_betweenmldescwithin_between_correlations

Dependencies:bootclidplyrfarvergenericsgluelabelinglatticelifecyclelme4magrittrMASSMatrixminqanlmenloptrpillarpkgconfigR6rbibutilsRColorBrewerRcppRcppEigenRdpackreformulasrlangscalesstringistringrtibbletidyselecttinytableutf8vctrsviridisLitewithr

Getting Started with mlstats
Example Data | Multilevel Descriptive Statistics | Estimation Method | Customising the Output | Pretty Printing | Decomposing Variables into Within- and Between-Person Components | References

Last update: 2026-07-11
Started: 2026-07-11

Multilevel Descriptive Statistics
Example Data | Why a Single Correlation Is Not Enough | Within- and Between-Group Correlations | Reading the Matrix | When Within and Between Diverge | Estimation Method and Weighting | Customising the Output | Pipe-Friendly Output | Bayesian Estimation | References

Last update: 2026-07-11
Started: 2026-07-11

Publication-Ready Tables
Example data | Default console output | tinytable format | Custom title and notes | gt format | Manipulating the result before printing | Removing columns | Replacing NA with a dash | Renaming variables | Combining manipulations | Embedding in Quarto documents | Word / DOCX output | HTML / PDF

Last update: 2026-07-11
Started: 2026-07-11

REWB Models
Example Data | Decomposing Time-Varying Predictors | Selecting Components | Customising Column Names | Decomposing Multiple Variables at Once | Fitting the REWB Model | Step 1 — Within and between effects | Step 2 — Accounting for confounding | Adding More Predictors | Adding Random Slopes | Further Reading | References

Last update: 2026-07-11
Started: 2026-07-11

Within- and Between-Group Correlation Methods
The decomposition method | Weighted vs. unweighted between-group correlations | Significance testing | The SEM method | The Bayesian method | Choosing a method | References

Last update: 2026-07-11
Started: 2026-07-11