Learn R Programming

ggm (version 2.2)

derived: Data on blood pressure body mass and age

Description

Raw data on blood pressure, body mass and age on 44 female patients, and covariance matrix for derived variables.

Usage

data(derived)

Arguments

References

Wermuth N. and Cox D.R. (1995). Derived variables calculated from similar joint responses: some characteristics and examples. Computational Statistics and Data Analysis, 19, 223-234.

Examples

Run this code
# A DAG model with a latent variable U
G = DAG(Y ~ Z + U, X ~ U + W, Z ~ W)

data(derived)

# The model fitted using the derived variables
out = fitDagLatent(G, derived$S, n = 44, latent = "U")

# An ancestral graph model marginalizing over U
H = AG(G, M = "U")

# The ancestral graph model fitted obtaining the 
# same result
out2 = fitAncestralGraph(H, derived$S, n = 44)

Run the code above in your browser using DataLab