simcausal icon indicating copy to clipboard operation
simcausal copied to clipboard

Simulating Longitudinal and Network Data with Causal Inference Applications

Results 17 simcausal issues
Sort by recently updated
recently updated
newest added

https://cran.r-project.org/web/packages/simcausal/index.html

Hi, I'd like to use simcausal for mediation analysis but wonder how this can best be done. For natural direct and indirect effects I need to simulate the crossworld counterfactual...

add S3 method `plot` for DAG object.

Simulated data contains two ID columns

I've run into the issue a few times, where when I call `simobs` get a `cannot find function 'melt'` error. When I run `library(data.table)`, the issue goes away. I have...

THIS no longer works, because the dimensions of catprob.W0 and catprob.W1 (1 row) do not match the dims of W (n rows) ``` R D

`latent.v` does not appear to work when output data is in long format ``` sim(DAG, wide=FALSE) ```

I am trying to perform a deterministic intervention on a DAG. ``` r library(simcausal) library(rje) D

Allow non-existing time-point references to default to some value, for example, instead of doing this ``` R node("TI", t=0:7, distr="rbern", prob=plogis(-5 - 0.3*CVD + 0.5*A1C[t] + 1.5*{if (t==0) {0} else...

enhancement

using as.integer() in node formulas prints it to the terminal: ``` R library(simcausal) D