Simulate Models Based on the Generalized Linear Model
Overview
Simulates regression models, including both simple regression and generalized linear mixed models with up to three level of nesting. Power simulations that are flexible allowing the specification of missing data, unbalanced designs, and different random error distributions are built into the package.
This major release accompanies the publication of the simglm book. It
expands the package's simulation and power-analysis capabilities and aligns
the package API with the examples presented in the book.
New outcome and data-generation options
- Added support for ordinal and multinomial outcomes.
- Added floor and ceiling controls for continuous outcomes.
- Changed factor simulation to preserve the declared order of levels rather than sorting levels alphabetically.
- Added
force_equal = TRUEfor generating equally represented factor levels. - Expanded support for unbalanced designs and flexible sample-size specifications.
- Generalized cross-classified data generation through multiple-membership simulation.
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
- Added post-processing and outcome aggregation tools.
- Extended formula parsing and simulation support for list-based specifications and multiple-equation workflows.
Power analysis and model fitting
- Reworked the power-simulation framework, including improved support for between- and within-subject designs.
- Added type S and type M error summaries.
- Added
robust_model()for models using robust standard errors.
Propensity score workflows
- Added
simulate_propensity()for generating non-random treatment assignment. - Added
fit_propensity()and support for covariate adjustment, inverse probability weighting (ipw), and stabilized balancing weights (sbw). - Added support, examples, and tests for multilevel propensity score designs.
Documentation, testing, and maintenance
- Expanded the vignettes and documentation for missing-data, factor, ordinal, multinomial, post-processing, power, and propensity score workflows.
- Added lightweight compatibility tests based on code published in the book.
- The package now requires R 4.1.0 or later because examples and simulation workflows use the native R pipe (|>)
- Removed
Matrixfrom package imports and addedgtools,sandwich, andlmtest.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-04
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-06-09
- ERROR12 OK, 1 ERROR2026-06-08
- OK14 OK2026-03-10
Documentation
- Help pages
- 35 (1 internal)includes a package overview page
- Examples that run
- no examples
- Exported functions with examples
- 0%
- Documented parameters
- 100%
- Return-value docs
- 6%
- Help pages citing references
- 0%
Downloads
Repository
- PRs merged (all time)
- 82%
- Median days to close, 50 most recently updated closed issues
- 30
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
PRs over time
Commits over time
10 development-tooling and community-health practices detected across 5 families in the upstream repository
Checks run against github.com/lebebr01/simglm on 2026-10-25.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-09-01 · The repository has a site deploy workflow
Show all practicesHide 1 practice
Dependencies
Code & Tests
People & History
Pick two releases to compare their code metrics.
- 1.0.0Latest2026-09-01 · current release · diff ↗ ·
removed 1 export
parse_crossclassadded 8 exports
aggregate_outcome_by_level, compute_density_values, fit_propensity, parse_multiplemember, parse_varyarguments_w, robust_model, sim_ordinal2, simulate_propensity - RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- unarchivedReturned to CRAN2022-02-07
- 0.8.92022-02-07 · diff ↗
- archivedRemoved from CRAN2022-02-06check problems were not corrected in time
- 0.8.82021-08-09 · diff ↗ ·
removed 33 exports
corr_variables, cross_class, data_glm_nested, data_glm_nested3, data_glm_single, data_reg_nested, data_reg_nested3, data_reg_single, sim_continuous, sim_err_nested, sim_err_single, sim_factor, sim_fixef_nested, sim_fixef_nested3, sim_fixef_single, sim_glm, sim_glm_nested, sim_glm_nested3, sim_glm_single, sim_knot, sim_pow, sim_pow_glm, sim_pow_glm_nested, sim_pow_glm_nested3, sim_pow_glm_single, sim_pow_nested, sim_pow_nested3, sim_pow_single, sim_rand_eff, sim_reg and 3 moreadded 3 exports
correlate_variables, parse_correlation, simulate_knot - RR 4.1.0 released · 2021-05-18
- 0.8.02020-06-12 · diff ↗
- RR 4.0.0 released · 2020-04-24
- 0.7.4
- RR 3.6.0 released · 2019-04-26
- 0.7.22019-01-23 · diff ↗
Show 6 earlier eventsHide 6 earlier events
- 0.7.12018-07-25 · diff ↗
- 0.7.02018-06-02 · diff ↗ ·
added 21 exports
compute_statistics, cross_class, extract_coefficients, generate_missing, generate_response, model_fit, parse_crossclass, parse_formula, parse_power, parse_randomeffect, parse_varyarguments, replicate_simulation, sim_continuous2, sim_factor2, sim_knot, sim_time, simglm, simulate_error, simulate_fixed, simulate_randomeffect, transform_outcome - RR 3.5.0 released · 2018-04-23
- 0.6.02017-07-24 · diff ↗
- 0.5.02017-05-25
- RR 3.4.0 released · 2017-04-21
Package metadata
- First published
- 2017-05-25
- Total releases
- 10 / 9 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 590 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("simglm")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-26, which the citation names so these numbers can be found later. More on citing and the projects behind them.