Learn R Programming

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

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

371

Version

0.2.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Oleg Sofrygin

Last Published

June 12th, 2015

Functions in simcausal (0.2.0)

distr.list

List All Custom Distribution Functions in simcausal.
DF.to.longDT

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

Subsetting/Indexing Actions Defined for DAG Object
add.action

Define and Add Actions (Interventions)
node

Create Node Object(s)
sim

Simulate Observed or Full Data from DAG Object
rdistr.template

Template for Writing Custom Distribution Functions
DAG.empty

Initialize an empty DAG object
vecfun.remove

Remove Custom Vectorized Functions
vecfun.all.print

Print Names of All Vectorized Functions
set.DAG

Create and Lock DAG Object
eval.target

Evaluate the True Value of the Causal Target Parameter
rcategor

Categorical Node Distribution (Factor)
add.nodes

Adding Node(s) to DAG
plotDAG

Plot DAG
set.targetMSM

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

Simulate Full Data (From Action DAG(s))
set.targetE

Define Non-Parametric Causal Parameters
print.DAG.node

Print DAG.node Object
rbern

Bernoulli Node Distribution
simcausal

Simulating Longitudinal Data with Causal Inference Applications
print.DAG.action

Print Action Object
vecfun.add

Add Custom Vectorized Functions
print.DAG

Print DAG Object
vecfun.reset

Reset Custom Vectorized Function List
N

Subsetting/Indexing DAG Nodes
simobs

Simulate Observed Data
parents

Show Node Parents Given DAG Object
DF.to.long

Convert Data from Wide to Long Format Using reshape
rcategor.int

Categorical Node Distribution (Integer)
vecfun.print

Print Names of Custom Vectorized Functions
doLTCF

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

(EXPERIMENTAL) Plot Discrete Survival Function(s)
rconst

Constant (Degenerate) Node Distribution