Learn R Programming

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

simcausal (version 0.3.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

306

Version

0.3.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Oleg Sofrygin

Last Published

August 24th, 2015

Functions in simcausal (0.3.0)

print.DAG.node

Print DAG.node Object
add.action

Define and Add Actions (Interventions)
set.targetE

Define Non-Parametric Causal Parameters
plotDAG

Plot DAG
DAG_Class

Class for storing a DAG object (the data generating distribution specified by the SEM)
NetInd.to.sparseAdjMat

Convert Network IDs Matrix into Sparse Adjacency Matrix
distr.list

List All Custom Distribution Functions in simcausal.
sparseAdjMat.to.igraph

Convert Network from Sparse Adjacency Matrix into igraph Object
DAG.empty

Initialize an empty DAG object
rbern

Bernoulli Node Distribution
A

Subsetting/Indexing Actions Defined for DAG Object
DF.to.longDT

Convert Data from Wide to Long Format Using dcast.data.table
parents

Show Node Parents Given DAG Object
add.nodes

Adding Node(s) to DAG
print.DAG

Print DAG Object
sparseAdjMat.to.NetInd

Convert Network from Sparse Adjacency Matrix into Network IDs Matrix
Node_Class

Class for storing a node 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
doLTCF

Missing Variable Imputation with Last Time Point Value Carried Forward (LTCF)
set.targetMSM

Define Causal Parameters with a Working Marginal Structural Model (MSM)
Define_sVar

Class for defining and evaluating user-specified summary measures (exprs_list)
set.DAG

Create and Lock DAG Object
node

Create Node Object(s)
simcausal

Simulating Longitudinal Data with Causal Inference Applications
sim

Simulate Observed or Full Data from DAG Object
igraph.to.sparseAdjMat

Convert igraph Network Object into Sparse Adjacency Matrix
rcategor

Categorical Node Distribution (Factor)
rcategor.int

Categorical Node Distribution (Integer)
plotSurvEst

(EXPERIMENTAL) Plot Discrete Survival Function(s)
vecfun.add

Add Custom Vectorized Functions
vecfun.print

Print Names of Custom Vectorized Functions
N

Subsetting/Indexing DAG Nodes
simobs

Simulate Observed Data
network

Define a Network Generator
DF.to.long

Convert Data from Wide to Long Format Using reshape
rconst

Constant (Degenerate) Node Distribution
vecfun.reset

Reset Custom Vectorized Function List
NetIndClass

R6 class for creating and storing a friend matrix (network IDs) for simulating network data
print.DAG.action

Print Action Object
vecfun.remove

Remove Custom Vectorized Functions
rdistr.template

Template for Writing Custom Distribution Functions
simfull

Simulate Full Data (From Action DAG(s))