Description Usage Format Details Examples
Simulated data and network for the pathfinder network from the Bayesian network repository. Pathfinder is an expert system developed by Heckerman et. al (1992) to assist with the diagnosis of lymph-node diseases.
1 |
A list with four components:
dag An edgeList containing the pathfinder network (109 nodes, 195 edges).
data A data.frame with 109 variables and 1000 observations.
ivn A list specifying which nodes are under intervention in each observation; since this dataset
is purely observational, this is just NULL. Compatible with the input to sparsebnData.
cov Covariance matrix used to generate the data.
The data is simulated from a Gaussian SEM assuming unit edge weights and unit variances for all nodes.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# Create a valid sparsebnData object from the simulated pathfinder data
data(pathfinder)
dat <- sparsebnData(pathfinder$data, type = "c")
# If desired, change the edge weights to be randomly generated
coefs <- get.adjacency.matrix(pathfinder$dag)
coefs[coefs != 0] <- runif(n = num.edges(pathfinderDAG), min = 0.5, max = 2)
vars <- Matrix::Diagonal(n = num.nodes(pathfinderDAG), x = rep(1, num.nodes(pathfinderDAG)))
id <- vars
covMat <- t(solve(id - coefs)) %*% vars %*% solve(id - coefs)
pathfinder.data <- rmvnorm(n = 1000, sigma = as.matrix(covMat))
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.