simstudy: Illuminating research methods through data generation

  • Goldfeld K
  • Wujciak-Jens J
N/ACitations
Citations of this article
18Readers
Mendeley users who have this article in their library.

Abstract

The simstudy package is a collection of functions for R (R Core Team, 2020) that allow users to generate simulated data sets in order to explore modeling techniques or better understand data generating processes. The user defines the distributions of individual variables, specifies relationships between covariates and outcomes, and generates data based on these specifications. The final data sets can represent randomized control trials, repeated measure designs, cluster-randomized trials, or naturally observed data processes. Many other complexities can be added, including survival data, correlated data, factorial study designs, step wedge designs, and missing data processes. Simulation using simstudy has two fundamental steps. The user (1) defines the data elements of a data set and (2) generates the data based on these definitions. Additional func-tionality exists to simulate observed or randomized treatment assignment/exposures, to create longitudinal/panel data, to create multi-level/hierarchical data, to create datasets with correlated variables based on a specified covariance structure, to merge datasets, to create data sets with missing data, and to create non-linear relationships with underlying spline curves. The overarching philosophy of simstudy is to create data generating processes that mimic the typical models used to fit those types of data. So, the parameterization of some of the data generating processes may not follow the standard parameterizations for the specific distributions. For example, in simstudy gamma-distributed data are generated based on the specification of a mean µ (or log(µ)) and a dispersion d, rather than shape α and rate β parameters that more typically characterize the gamma distribution. When we estimate the parameters, we are modeling µ (or some function of (µ)), so we should explicitly recover the simstudy parameters used to generate the model-illuminating the relationship between the underlying data generating processes and the models. For more details on the package, use cases, examples, and function reference see the documentation page. simstudy is available on CRAN and can be installed with: install.packages("simstudy")

Cite

CITATION STYLE

APA

Goldfeld, K., & Wujciak-Jens, J. (2020). simstudy: Illuminating research methods through data generation. Journal of Open Source Software, 5(54), 2763. https://doi.org/10.21105/joss.02763

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free