Last chance! 50% off unlimited learning
Sale ends in
10000 observations simulated from a DAG with 10 variables from Poisson, Bernoulli and Gaussian distributions.
ex1.dag.data
A data frame, binary variables are factors. The relevant formulas are given below (note these do not give parameter estimates just the form of the relationships, like in glm(), e.g. logit()=1+p1 means a logit link function and comprises of an intercept term and a term involving p1).
b1binary, logit()=1
p1poisson, log()=1
g1gaussian, identity()=1
b2binary, logit()=1
p2poisson, log()=1+b1+p1
b3binary, logit()=1+b1+g1+b2
g2gaussian, identify()=1+p1+g1+b2
b4binary, logit()=1+g1+p2
b5binary, logit()=1+g1+g2
g3gaussian, identity()=1+g1+b2
## The data is one realisation from the the underlying DAG:
ex1.true.dag <- matrix(data=c(
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,
1,1,0,0,0,0,0,0,0,0,
1,0,1,1,0,0,0,0,0,0,
0,1,1,1,0,0,0,0,0,0,
0,0,1,0,1,0,0,0,0,0,
0,0,1,0,0,0,1,0,0,0,
0,0,1,1,0,0,0,0,0,0), ncol=10, byrow=TRUE)
colnames(ex1.true.dag) <- rownames(ex1.true.dag) <-
c("b1","p1","g1","b2","p2","b3","g2","b4","b5","g3")
Run the code above in your browser using DataLab