Learn R Programming

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

simcausal (version 0.1)

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.

Copy Link

Version

Install

install.packages('simcausal')

Monthly Downloads

297

Version

0.1

License

GPL-2

Maintainer

Oleg Sofrygin

Last Published

May 16th, 2015

Functions in simcausal (0.1)

A

Subsetting/indexing actions defined for DAG object
eval.target

Evaluate the Causal Target Parameter via Monte-Carlo Simulation
print.DAG.action

Print Action Object
DF.to.longDT

Convert data.frame into long format (faster than DF.to.long)
vecfun.all.print

Print names of all vectorized functions
rcategor.int

Categorical node distribution (integer)
distr.list

List all custom distribution functions in SimCausal.
set.targetE

Node Expectations (E) as the Causal Target Parameter
rdistr.template

Template for writing custom distributions
doLTCF

Last Timepoint Carried Forward (LTCF)
add.nodes

Adding Nodes to DAG
print.DAG.node

Print DAG.node Object
DAG.empty

Initialize an empty DAG object
set.DAG

Create and lock DAG object
vecfun.remove

Remove custom vectorized functions
simobs

Simulate Observed Data
N

Subsetting/indexing DAG nodes
plotDAG

Plot DAG
node.depr

Create Node Object(s) (Deprecated)
node

Create Node Object(s)
add.action

Define Actions
DF.to.long

Convert data from wide format into long format using reshape base function
set.targetMSM

MSMs as the Causal Target Parameter
vecfun.add

Add custom vectorized functions
sim

Simulate from DAG or list of DAGs (Either Action or Observed DAG(s))
rconst

Constant (degenerate) node distribution
plotSurvEst

(EXPERIMENTAL) Plot Survival
vecfun.reset

Reset custom vectorized function list
rbern

Bernoulli node distribution
parents

Show Node Parents Given DAG Object
simcausal

Simulate longitudinal data and evaluate causal parameters
print.DAG

Print DAG Object
rcategor

Categorical node distribution (factor)
simfull

Simulate Full Data (From Action/Intervention DAG(s))
vecfun.print

Print names of custom vectorized functions