
Last chance! 50% off unlimited learning
Sale ends in
Y
’ and ‘X
’ from a ‘datacggm
’ Object‘getMatrix
’ retrieves matrices ‘Y
’ and/or ‘X
’ from an object of class ‘datacggm
’.
getMatrix(x, name = c("Y", "X", "both"), ordered = FALSE)
an object of class ‘datacggm
’.
the name of the required matrix.
logical value used to specify if the required matrix should be retrieved with rows ordered according to the patterns of censored values. See below for some example.
getMatrix
retrieves the matrix specified by ‘name
’ and with row ordering specified by ‘ordered
’. A named list returned if name
is "both"
.
Augugliaro, L., Sottile, G., and Vinciotti, V. (2020) <10.1007/s11222-020-09945-7>. The conditional censored graphical lasso estimator. Statistics and Computing 30, 1273--1289.
Augugliaro, L., Abbruzzo, A., and Vinciotti, V. (2020) <10.1093/biostatistics/kxy043>.
# NOT RUN {
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