Package: simcausal 0.5.5

Oleg Sofrygin

simcausal: Simulating Longitudinal Data with Causal Inference Applications

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.

Authors:Oleg Sofrygin [aut, cre], Mark J. van der Laan [aut], Romain Neugebauer [aut]

simcausal_0.5.5.tar.gz
simcausal_0.5.5.zip(r-4.5)simcausal_0.5.5.zip(r-4.4)simcausal_0.5.5.zip(r-4.3)
simcausal_0.5.5.tgz(r-4.4-any)simcausal_0.5.5.tgz(r-4.3-any)
simcausal_0.5.5.tar.gz(r-4.5-noble)simcausal_0.5.5.tar.gz(r-4.4-noble)
simcausal_0.5.5.tgz(r-4.4-emscripten)simcausal_0.5.5.tgz(r-4.3-emscripten)
simcausal.pdf |simcausal.html
simcausal/json (API)
NEWS

# Install 'simcausal' in R:
install.packages('simcausal', repos = c('https://osofr.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/osofr/simcausal/issues

On CRAN:

counterfactual-datasemsimulated-networksimulating-datastructural-equations

44 exports 64 stars 3.48 score 16 dependencies 160 scripts 373 downloads

Last updated 2 months agofrom:bce5ad71eb. Checks:OK: 5 NOTE: 2. Indexed: yes.

TargetResultDate
Doc / VignettesOKSep 16 2024
R-4.5-winNOTESep 16 2024
R-4.5-linuxNOTESep 16 2024
R-4.4-winOKSep 16 2024
R-4.4-macOKSep 16 2024
R-4.3-winOKSep 16 2024
R-4.3-macOKSep 16 2024

Exports:Aactionadd.actionadd.nodesDAG.emptyDF.to.longDF.to.longDTdistr.listdoLTCFeval.targetigraph.to.sparseAdjMatNnet.listNetInd.to.sparseAdjMatNetIndClassnetworknodeparentsplotDAGplotSurvEstrbernrcat.b0rcat.b1rcat.factorrcategorrcategor.intrconstrdistr.templaternet.gnmrnet.gnprnet.SmWorldset.DAGset.targetEset.targetMSMsimsimfullsimobssparseAdjMat.to.igraphsparseAdjMat.to.NetIndvecfun.addvecfun.all.printvecfun.printvecfun.removevecfun.reset

Dependencies:assertthatclicpp11data.tableglueigraphlatticelifecyclemagrittrMatrixpkgconfigR6rlangstringistringrvctrs

simcausal Package: Simulations with Complex Longitudinal Data (Technical Details and Extended Examples)

Rendered fromsimcausal_vignette.Rnwusingknitr::knitron Sep 16 2024.

Last update: 2022-10-15
Started: 2015-06-11

Readme and manuals

Help Manual

Help pageTopics
Subsetting/Indexing Actions Defined for 'DAG' ObjectA
Define and Add Actions (Interventions)action add.action
Adding Node(s) to DAG+.DAG add.nodes
Initialize an empty DAG objectDAG.empty
Class for defining and evaluating user-specified summary measures (exprs_list)Define_sVar
Convert Data from Wide to Long Format Using 'reshape'DF.to.long
Faster Conversion of Data from Wide to Long Format Using 'dcast.data.table'DF.to.longDT
List All Custom Distribution Functions in 'simcausal'.distr.list
Missing Variable Imputation with Last Time Point Value Carried Forward (LTCF)doLTCF
Evaluate the True Value of the Causal Target Parametereval.target
Convert igraph Network Object into Sparse Adjacency Matrixigraph.to.sparseAdjMat
Subsetting/Indexing 'DAG' NodesN
List All Custom Network Generator Functions in 'simcausal'.net.list
Convert Network IDs Matrix into Sparse Adjacency MatrixNetInd.to.sparseAdjMat
R6 class for creating and storing a friend matrix (network IDs) for network dataNetIndClass
Define a Network Generatornetwork
Create Node Object(s)node
Show Node Parents Given DAG Objectparents
Plot DAGplotDAG
(EXPERIMENTAL) Plot Discrete Survival Function(s)plotSurvEst
Print DAG Objectprint.DAG
Print Action Objectprint.DAG.action
Print DAG.node Objectprint.DAG.node
Random Sample from Bernoulli Distributionrbern
Random Sample for a Categorical Factorrcat.factor rcategor
Random Sample from Base 1 (rcat.b1) or Base 0 (rcat.b0) Categorical (Integer) Distributionrcat.b0 rcat.b1 rcategor.int
Constant (Degenerate) Distribution (Returns its Own Argument 'const')rconst
Template for Writing Custom Distribution Functionsrdistr.template
Call 'igraph::sample_gnm' to Generate Random Graph Object According to the G(n,m) Erdos-Renyi Modelrnet.gnm
Call 'igraph::sample_gnp' to Generate Random Graph Object According to the G(n,p) Erdos-Renyi Modelrnet.gnp
Call 'igraph::sample_smallworld' to Generate Random Graph Object from the Watts-Strogatz Small-World Modelrnet.SmWorld
Create and Lock DAG Objectset.DAG
Define Non-Parametric Causal Parametersset.targetE
Define Causal Parameters with a Working Marginal Structural Model (MSM)set.targetMSM
Simulate Observed or Full Data from 'DAG' Objectsim
Simulating Longitudinal Data with Causal Inference Applicationssimcausal-package simcausal
Simulate Full Data (From Action DAG(s))simfull
Simulate Observed Datasimobs
Convert Network from Sparse Adjacency Matrix into igraph ObjectsparseAdjMat.to.igraph
Convert Network from Sparse Adjacency Matrix into Network IDs MatrixsparseAdjMat.to.NetInd
Add Custom Vectorized Functionsvecfun.add
Print Names of All Vectorized Functionsvecfun.all.print
Print Names of Custom Vectorized Functionsvecfun.print
Remove Custom Vectorized Functionsvecfun.remove
Reset Custom Vectorized Function Listvecfun.reset