MyNixOS website logo
Description

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.

simglm: Tidy simulation and power analyses

R build status AppVeyor build status codecov.io CRAN_Status_Badge

Package Installation

This package can be directly installed through CRAN:

install.packages("simglm")

The development version of the package can be installed by using the devtools package.

library(devtools)
install_github("lebebr01/simglm")

Introduction to the simglm package

The best way to become oriented with the simglm package is through the package vignette. There are two ways to get to the vignettes (both will open a browser to view the vignette). Below is an example loading the "Intro" vignette directly:

browseVignettes()
vignette("Intro", package = "simglm")

Note: If you install the development version of the package, you may need to tell R to build the vignettes when installing the simglm package by doing the following:

install_github("lebebr01/simglm", build_vignettes = TRUE)

Features

A flexible suite of functions to simulate nested data.
Currently supports the following features:

  • Longitudinal data simulation
  • Three levels of nesting
  • Specification of distribution of random components (random effects and random error)
  • Specification of serial correlation
  • Specification of the number of variables
    • Ability to add time-varying covariates
    • Specify the mean and variance of fixed covariate variables
    • Factor variable simulation
    • Ordinal variable simulation
  • Generation of mixture normal distributions
  • Cross sectional data simulation
  • Single level simulation
  • Power by simulation
    • Vary parameters for a factorial simulation design.
    • Can vary model fitted to the data to misspecify directly.
  • Simulation of missing data
  • Include other distributions for covariate simulation.
  • Continuous, Logistic (dichotomous), and Poisson (count) outcome variables.
  • Cross classified simulation and power

Bugs/Feature Requests

Bugs and feature requests are welcomed. Please track these on GitHub here: https://github.com/lebebr01/simglm/issues. I'm also open to pull requests.

Enjoy!

Metadata

Version

0.8.9

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