Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

dag_ex2

Synthetic validation data set for use with abn library examples


Description

10000 observations simulated from a DAG with 18 variables three sets each from Poisson, Bernoulli and Gaussian distributions.

Usage

ex2.dag.data

Format

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, e.g. logit()=1 means a logit link function and comprises of only an intercept term).

b1

binary,logit()=1+g1+b2+b3+p3+b4+g4+b5

g1

gaussian,identity()=1

p1

poisson,log()=1+g6

b2

binary,logit()=1+p3+b4+p6

g2

gaussian,identify()=1+b2

p2

poisson,log()=1+b2

b3

binary,logit()=1+g1+g2+p2+g3+p3+g4

g3

gaussian,identify()=1+g1+p3+b4

p3

poisson,log()=1

b4

binary,logit()=1+g1+p3+p5

g4

gaussian,identify()=1+b4;

p4

poisson,log()=1+g1+b2+g2+b5

b5

binary,logit()=1+b2+g2+b3+p3+g4

g5

gaussian,identify()=1

p5

poisson,log()=1+g1+g5+b6+g6

b6

binary,logit()=1

g6

gaussian,identify()=1

p6

poisson,log()=1+g5

Examples

## The true underlying stochastic model has DAG - this data is a single realisation.
ex2.true.dag <- matrix(data = c(
   0,1,0,1,0,0,1,0,1,1,1,0,1,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,0,
   0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,1,
   0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
   0,1,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,
   0,1,0,0,0,0,0,0,1,1,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,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,
   0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,
   0,1,0,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,
   0,0,0,1,1,0,1,0,1,0,1,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,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,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,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0
   ), ncol = 18, byrow = TRUE)

colnames(ex2.true.dag) <- rownames(ex2.true.dag) <- c("b1","g1","p1","b2",
  "g2","p2","b3","g3","p3","b4","g4","p4","b5","g5","p5","b6","g6","p6")

abn

Modelling Multivariate Data with Additive Bayesian Networks

v2.5-0
GPL (>= 2)
Authors
Gilles Kratzer [aut, cre] (<https://orcid.org/0000-0002-5929-8935>), Fraser Iain Lewis [aut] (<https://orcid.org/0000-0003-4580-2712>), Reinhard Furrer [ctb] (<https://orcid.org/0000-0002-6319-2332>), Marta Pittavino [ctb] (<https://orcid.org/0000-0002-1232-1034>)
Initial release
2021-04-21

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.