Learn R Programming

bnlearn (version 1.1)

gaussian.test: Synthetic (continuous) dataset to test learning algorithms

Description

This a synthetic data set used as a test case in the bnlearn package.

Usage

data(gaussian.test)

Arguments

format

The gaussian.test data set contains the seven normal (Gaussian) variables.

Examples

Run this code
## The modelstring() of this data set is:
# [A][B][E][G][C|A:B:E][D|B][F|A:D:E:G]

# these are the R commands used to generate this data set.
a = data.frame(A = rnorm(5000, 1, 1),
               B = rnorm(5000, 2, 3),
               C = rep(0, 5000),
               D = rep(0, 5000),
               E = rnorm(5000, 3.5, 2),
               F = rep(0, 5000),
               G = rnorm(5000, 5, 2))
a$C = 2 * (a$A + a$B) + rnorm(5000, 2, 0.5)
a$D = 1.5 * a$B + rnorm(5000, 6, 0.33)
a$F = 2 * a$A + a$D + a$E + 1.5 * a$G + rnorm(5000, 0, 1)

Run the code above in your browser using DataLab