Package: simglm 0.9.31

simglm: Simulate Models Based on the Generalized Linear Model

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.

Authors:Brandon LeBeau [aut, cre]

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

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

Bug tracker:https://github.com/lebebr01/simglm/issues

On CRAN:

Conda:

powersimulation

8.72 score 46 stars 142 scripts 334 downloads 4 mentions 37 exports 34 dependencies

Last updated from:6a451db841. Checks:9 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64OK161
source / vignettesOK222
linux-release-x86_64OK203
macos-release-arm64OK152
macos-oldrel-arm64OK141
windows-develOK112
windows-releaseOK95
windows-oldrelOK95
wasm-releaseOK124

Exports:aggregate_outcome_by_levelcompute_density_valuescompute_statisticscorrelate_variablesdesireVardropout_missingextract_coefficientsfit_propensitygenerate_missinggenerate_responsemar_missingmissing_datamodel_fitparse_correlationparse_formulaparse_multiplememberparse_powerparse_randomeffectparse_varyargumentsparse_varyarguments_wrandom_missingrbimodreplicate_simulationrobust_modelrun_shinysim_continuous2sim_factor2sim_ordinal2sim_timesimglmsimulate_errorsimulate_fixedsimulate_heterogeneitysimulate_knotsimulate_propensitysimulate_randomeffecttransform_outcome

Dependencies:backportsbroomclicodetoolscpp11digestdplyrfuturefuture.applygenericsglobalsgluegtoolslatticelifecyclelistenvlmtestmagrittrparallellypillarpkgconfigpurrrR6rlangsandwichstringistringrtibbletidyrtidyselectutf8vctrswithrzoo

Spline Simulation with simglm
Spline Simulation | Natural Cubic Spline | Generating an Outcome | B-Spline Basis | Model Fitting | Power Simulation

Last update: 2026-04-30
Started: 2026-04-30

Propensity Simulation for simglm
Simulate Propensity Scores | Include Propensity scores into broader process | Model fitting with propensity scores | Multilevel Propensity Scores | Multilevel propensity scores - level 2 treatment

Last update: 2025-11-24
Started: 2025-09-24

Tidy Simulation with simglm
Functions for Basic Simulation | First Linear Regression Example | Fixed Portion of Model | Simulate Random Error | Generate Response Variable | Generate Response with more than 2 factor levels | Non-normal Outcomes | Functions for Power Analysis | Replicate Analysis | Nested Designs

Last update: 2023-11-24
Started: 2018-04-19

Simulation Argument Details for simglm
Fixed Arguments | Time Variable | Continuous Variable | Floor or Ceiling Effects | Ordinal Variable | Factor Variable | Force Balanced Simulation | Knot Variables | Random Error Arguments | Optional Arguments for Random Error | Heterogeneity of Variance | Random Effect Arguments | Multiple Membership Random Effects | Correlated Fixed and Random Effects | Fixed Effect Correlation | Random Effect Correlation | Unbalanced level 2 and 3 designs | Unbalanced Level 2 Example | Unbalanced Level 3 Example | Missing Data Arguments | Random Missing Data | MAR Missing Data | Dropout Missing Data | Specify location of dropout | Model Fit Arguments | Changing Family Argument | Adding Serial Correlation | Marginal Models | Power Arguments | Vary Simulation Arguments | Varying Arguments to Compute Power

Last update: 2023-07-19
Started: 2018-04-19

Readme and manuals

Help Manual

Help pageTopics
Aggregate outcome to specified cluster levelaggregate_outcome_by_level
Convenience function for computing density values for plotting.compute_density_values
Compute Power, Type I Error, or Precision Statisticscompute_statistics
Correlate elementscorrelate_variables
Computes mixture normal variancedesireVar
Extract Coefficientsextract_coefficients
Primary propensity model fittingfit_propensity
Tidy Missing Data Functiongenerate_missing
Simulate response variablegenerate_response
Missing Data Functionsdropout_missing mar_missing missing_data random_missing
Tidy Model Fitting Functionmodel_fit
Parse correlation argumentsparse_correlation
Parses tidy formula simulation syntaxparse_formula
Parse Multiple Membership Random Effectsparse_multiplemember
Parse power specificationsparse_power
Parses random effect specificationparse_randomeffect
Parse between varying argumentsparse_varyarguments
Parse within varying argumentsparse_varyarguments_w
Simulating mixture normal distributionsrbimod
Replicate Simulationreplicate_simulation
Robust Model Standard Errorsrobust_model
Run Shiny Application Demorun_shiny
Simulate continuous variablessim_continuous2
Simulate categorical or factor variablessim_factor2
Simulate discrete variablessim_ordinal2
Simulate Timesim_time
Single wrapper functionsimglm
Tidy error simulationsimulate_error
Tidy fixed effect formula simulationsimulate_fixed
Tidy heterogeneity of variance simulationsimulate_heterogeneity
Simulate knot locationssimulate_knot
Simulate Propensity Scoressimulate_propensity
Tidy random effect formula simulationsimulate_randomeffect
Transform response variabletransform_outcome