simcausal v0.5.0


Monthly downloads



by Oleg Sofrygin

Simulating Longitudinal Data with Causal Inference Applications

A flexible tool for simulating complex longitudinal data using structural equations, with emphasis on problems in causal inference. Specify interventions and simulate from intervened data generating distributions. Define and evaluate treatment-specific means, the average treatment effects and coefficients from working marginal structural models. User interface designed to facilitate the conduct of transparent and reproducible simulation studies, and allows concise expression of complex functional dependencies for a large number of time-varying nodes. See the package vignette for more information, documentation and examples.

Functions in simcausal

Name Description Convert Data from Wide to Long Format Using reshape
Define_sVar Class for defining and evaluating user-specified summary measures (exprs_list) Convert Network IDs Matrix into Sparse Adjacency Matrix
network Define a Network Generator
DAG_Class Class for storing a DAG object (the data generating distribution specified by the SEM)
vecfun.all.print Print Names of All Vectorized Functions Evaluate the True Value of the Causal Target Parameter Categorical Node Distribution (Integer)
parents Show Node Parents Given DAG Object
sim Simulate Observed or Full Data from DAG Object
doLTCF Missing Variable Imputation with Last Time Point Value Carried Forward (LTCF)
set.targetMSM Define Causal Parameters with a Working Marginal Structural Model (MSM)
set.DAG Create and Lock DAG Object
add.nodes Adding Node(s) to DAG
plotDAG Plot DAG
set.targetE Define Non-Parametric Causal Parameters
rcategor Categorical Node Distribution (Factor)
rdistr.template Template for Writing Custom Distribution Functions Faster Conversion of Data from Wide to Long Format Using Convert igraph Network Object into Sparse Adjacency Matrix
N Subsetting/Indexing DAG Nodes Convert Network from Sparse Adjacency Matrix into igraph Object
add.action Define and Add Actions (Interventions)
simfull Simulate Full Data (From Action DAG(s))
print.DAG.node Print DAG.node Object
A Subsetting/Indexing Actions Defined for DAG Object
NetIndClass R6 class for creating and storing a friend matrix (network IDs) for network data
Node_Class Class for storing a node object (the data generating distribution specified by the SEM)
plotSurvEst (EXPERIMENTAL) Plot Discrete Survival Function(s)
vecfun.remove Remove Custom Vectorized Functions
vecfun.print Print Names of Custom Vectorized Functions
simcausal Simulating Longitudinal Data with Causal Inference Applications
rconst Constant (Degenerate) Node Distribution
print.DAG Print DAG Object
node Create Node Object(s) Convert Network from Sparse Adjacency Matrix into Network IDs Matrix
vecfun.reset Reset Custom Vectorized Function List
vecfun.add Add Custom Vectorized Functions
simobs Simulate Observed Data
rbern Bernoulli Node Distribution
distr.list List All Custom Distribution Functions in simcausal.
DAG.empty Initialize an empty DAG object
print.DAG.action Print Action Object
No Results!

Last month downloads


Type Package
VignetteBuilder knitr
License GPL-2
NeedsCompilation no
Packaged 2016-02-20 03:23:21 UTC; olegsofrygin
Repository CRAN
Date/Publication 2016-02-20 08:55:22

Include our badge in your README