Learn R Programming

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

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

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Oleg Sofrygin

Last Published

September 21st, 2015

Functions in simcausal (0.4.0)

parents

Show Node Parents Given DAG Object
network

Define a Network Generator
vecfun.add

Add Custom Vectorized Functions
rcategor.int

Categorical Node Distribution (Integer)
DF.to.longDT

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

Simulate Observed or Full Data from DAG Object
plotSurvEst

(EXPERIMENTAL) Plot Discrete Survival Function(s)
Define_sVar

Class for defining and evaluating user-specified summary measures (exprs_list)
vecfun.remove

Remove Custom Vectorized Functions
DAG.empty

Initialize an empty DAG object
vecfun.print

Print Names of Custom Vectorized Functions
simobs

Simulate Observed Data
eval.target

Evaluate the True Value of the Causal Target Parameter
N

Subsetting/Indexing DAG Nodes
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
node

Create Node Object(s)
doLTCF

Missing Variable Imputation with Last Time Point Value Carried Forward (LTCF)
Node_Class

Class for storing a node object (the data generating distribution specified by the SEM)
distr.list

List All Custom Distribution Functions in simcausal.
print.DAG.action

Print Action Object
simfull

Simulate Full Data (From Action DAG(s))
sparseAdjMat.to.igraph

Convert Network from Sparse Adjacency Matrix into igraph Object
DF.to.long

Convert Data from Wide to Long Format Using reshape
set.DAG

Create and Lock DAG Object
vecfun.reset

Reset Custom Vectorized Function List
simcausal

Simulating Longitudinal Data with Causal Inference Applications
rdistr.template

Template for Writing Custom Distribution Functions
igraph.to.sparseAdjMat

Convert igraph Network Object into Sparse Adjacency Matrix
rcategor

Categorical Node Distribution (Factor)
add.nodes

Adding Node(s) to DAG
print.DAG

Print DAG Object
NetIndClass

R6 class for creating and storing a friend matrix (network IDs) for network data
rconst

Constant (Degenerate) Node Distribution
A

Subsetting/Indexing Actions Defined for DAG Object
sparseAdjMat.to.NetInd

Convert Network from Sparse Adjacency Matrix into Network IDs Matrix
plotDAG

Plot DAG
set.targetE

Define Non-Parametric Causal Parameters
set.targetMSM

Define Causal Parameters with a Working Marginal Structural Model (MSM)
NetInd.to.sparseAdjMat

Convert Network IDs Matrix into Sparse Adjacency Matrix
print.DAG.node

Print DAG.node Object
add.action

Define and Add Actions (Interventions)
rbern

Bernoulli Node Distribution