simcausal: Simulating Longitudinal Data with Causal Inference Applications
Description
The simcausal R package is a tool for specification and simulation of complex longitudinal data structures that are
based on structural equation models. The package provides a flexible tool for conducting transparent and reproducible
simulation studies, with a particular emphasis on the types of data and interventions frequently encountered in typical
causal inference problems, such as, observational data with time-dependent confounding, selection bias, and random monitoring processes.
The package interface allows for concise expression of complex functional dependencies between a large number of nodes,
where each node may represent a time-varying random variable.
The package allows for specification and simulation of counterfactual data under various user-specified interventions
(e.g., static, dynamic, deterministic, or stochastic).
In particular, the interventions may represent exposures to treatment regimens, the occurrence or non-occurrence of right-censoring
events, or of clinical monitoring events. simcausal enables the computation of a selected set of user-specified
features of the distribution of the counterfactual data that represent common causal quantities of interest,
such as, treatment-specific means, the average treatment effects and coefficients from working marginal structural models.
For additional details and examples please see the package vignette and the function-specific documentation.Documentation
- To see the package vignette use:
vignette("simcausal_vignette", package="simcausal")
- To see all available package documentation use:
help(package = 'simcausal')
Data structures
The following most common types of output are produced by the package:
- parameterized causal
DAG
model- object that specifies the structural equation model, along with interventions and the causal target parameter of interest. - observed data- data simulated from the (pre-intervention) distribution specified by the structural equation model.
- full data- data simulated from one or more post-intervention distributions defined by actions on the structural equation model.
- causal target parameter- the true value of the causal target parameter evaluated with full data.
Updates
Check for updates and report bugs at http://github.com/osofr/simcausal.