Comments (2)
Hi Bradley,
Thanks for filing this, but I can't replicate your issue. Is it possible that you don't have the latest version of data.table installed? Another possibility is that you may have reshape2 loaded in your environment, but I wouldn't expect that to cause an issue. data.table::melt
had to be replaced with melt() to pass CRAN checks since data.table now exports its own S3 generic for melt, which might clash with the S3 generic for melt that is also exported by reshape2...
library("simcausal"); options(simcausal.verbose=FALSE)
t_end <- 5
D <- DAG.empty() +
node("W", distr="rbern", prob=0.05) +
node("L1", t=0:t_end, distr="rbern", prob=0.25) +
node("L2", t=0:t_end, distr="rconst", const=L1[t] + W) +
node("Y", t=0:t_end, distr="rbern", prob=plogis(-6.5 + L1[t] + 2*L2[t] + 0.05*sum(I(L2[0:t]==rep(0,(t+1))))), EFU=TRUE)
Dset <- set.DAG(D)
Odat1 <- sim(Dset, n=500, wide = TRUE, rndseed = 123)
Odat1 <- simobs(Dset, n=500, wide = TRUE, rndseed = 123)
Odat1 <- sim(Dset, n=500, wide = FALSE, rndseed = 123)
Odat1 <- simobs(Dset, n=500, wide = FALSE, rndseed = 123)
from simcausal.
It may be a reshape2 issue, though I haven't add that package loaded when I've had the issue. I'll try to come up with a reproducible example, but it's not high priority.
Thanks!
from simcausal.
Related Issues (19)
- Error in rcategor and rcategor.int for large numbers of groups HOT 3
- using as.integer() in node formulas prints to the terminal:
- Default values for non-existing time-points
- Defining an deterministic action HOT 1
- Performing intervention in ver. 0.5.0 HOT 2
- latent variables still show up in data when simulating in long format
- Evaluation of categorical by variable name
- fix dependency for rmvnorm HOT 3
- Understanding Non-standard evaluation in 0.5.1 HOT 5
- double ID column
- plot function for DAGs HOT 1
- Mediation Analysis with simcausal
- Removed from CRAN HOT 1
- Removed from CRAN again HOT 2
- #Simulating from a fixed network HOT 1
- Gaussian var affecting categorical var HOT 4
- igraph Compatability
- Bernoulli var affecting Poisson var
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simcausal.