Learn R Programming

⚠️There's a newer version (0.5.7) of this package.Take me there.

simcausal (version 0.5.0)

Simulating Longitudinal Data with Causal Inference Applications

Description

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.

Copy Link

Version

Install

install.packages('simcausal')

Monthly Downloads

292

Version

0.5.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Oleg Sofrygin

Last Published

February 20th, 2016

Functions in simcausal (0.5.0)

DF.to.long

Convert Data from Wide to Long Format Using reshape
Define_sVar

Class for defining and evaluating user-specified summary measures (exprs_list)
NetInd.to.sparseAdjMat

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
eval.target

Evaluate the True Value of the Causal Target Parameter
rcategor.int

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
DF.to.longDT

Faster Conversion of Data from Wide to Long Format Using dcast.data.table
igraph.to.sparseAdjMat

Convert igraph Network Object into Sparse Adjacency Matrix
N

Subsetting/Indexing DAG Nodes
sparseAdjMat.to.igraph

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)
sparseAdjMat.to.NetInd

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