set.seed(123)
# a dataset from a conditional censored Gaussian graphical model
n <- 100L
p <- 3L
q <- 2
b0 <- runif(p)
B <- matrix(runif(q * p), nrow = q, ncol = p)
X <- matrix(rnorm(n * q), nrow = n, ncol = q)
Z <- rcggm(n = n, b0 = b0, X = X, B = B, probl = 0.05, probr = 0.05)
getMatrix(Z, name = "Y")
# in the following examples 'Y' and 'X' is returned with rows ordered
# according to the patterns of censored data
getMatrix(Z, name = "Y", ordered = TRUE)
getMatrix(Z, name = "X")
getMatrix(Z, name = "X", ordered = TRUE)
getMatrix(Z, name = "both")
getMatrix(Z, name = "both", ordered = TRUE)
Run the code above in your browser using DataLab