getMatrix: Retrieve Matrices "Y" and "X" from a "datacggm" Object

Description Usage Arguments Value Author(s) References See Also Examples

Description

getMatrix’ retrieves matrices ‘Y’ and/or ‘X’ from an object of class ‘datacggm’.

Usage

1
getMatrix(x, name = c("Y", "X", "both"), ordered = FALSE)

Arguments

x

an object of class ‘datacggm’.

name

the name of the required matrix.

ordered

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.

Value

getMatrix retrieves the matrix specified by ‘name’ and with row ordering specified by ‘ordered’. A named list returned if name is "both".

Author(s)

Luigi Augugliaro (luigi.augugliaro@unipa.it)

References

Augugliaro, L., Sottile, G., and Vinciotti, V. (2020) <doi: 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) <doi: 10.1093/biostatistics/kxy043>. l1-Penalized censored Gaussian graphical model. Biostatistics 21, e1–e16.

See Also

datacggm, rcggm.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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)

cglasso documentation built on April 9, 2021, 9:07 a.m.