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

gmI

Graphical Model 7-dim IDA Data Examples


Description

This data set contains a matrix containing information on seven gaussian variables and the corresonding DAG model.

Usage

data(gmI)

Format

The two gmI* objects are each a list of two components x, an n * 7 numeric matrix, and g, a DAG, a graph generated by randomDAG.

See gmG for more

Details

The data was generated as indicated below. First, a random DAG was generated, then samples were drawn from this model, strictly speaking for gmI7 only.

Source

The data sets are identical to those generated by

## Used to generate "gmI"
   set.seed(123)
   p <- 7
   myDAG <- randomDAG(p, prob = 0.2) ## true DAG
   gmI  <- list(x = rmvDAG(10000, myDAG, back.compatible=TRUE), g = myDAG)
   gmI7 <- list(x = rmvDAG( 8000, myDAG),                       g = myDAG)

Examples

data(gmI)
str(gmI, max=3)
stopifnot(identical(gmI $ g, gmI7 $ g))
if(dev.interactive()) { ## to save time in tests
  round(as(gmI $ g, "Matrix"), 2) # weight ("adjacency") matrix
  plot(gmI $ g)
  pairs(gmI$x, gap = 0,
        panel=function(...) smoothScatter(..., add=TRUE))
}

pcalg

Methods for Graphical Models and Causal Inference

v2.7-2
GPL (>= 2)
Authors
Markus Kalisch [aut, cre], Alain Hauser [aut], Martin Maechler [aut], Diego Colombo [ctb], Doris Entner [ctb], Patrik Hoyer [ctb], Antti Hyttinen [ctb], Jonas Peters [ctb], Nicoletta Andri [ctb], Emilija Perkovic [ctb], Preetam Nandy [ctb], Philipp Ruetimann [ctb], Daniel Stekhoven [ctb], Manuel Schuerch [ctb], Marco Eigenmann [ctb], Leonard Henckel [ctb], Joris Mooij [ctb]
Initial release
2021-4-20

We don't support your browser anymore

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