event {cglasso} | R Documentation |
Status Indicator Matrix from a ‘datacggm
’ Object
Description
The ‘event
’ function retrieves the status indicator matrix from an object of class ‘datacggm
’.
Usage
event(x, ordered = FALSE)
Arguments
x |
an object of class ‘ |
ordered |
logical value used to specify if the rows of the status indicator matrix should be ordered according to the patterns of censored/missing values. Default |
Details
The ‘event
’ function is used to retrieve the status indicator matrix, denoted by R
, from an object of class ‘datacggm
’. The entries of the matrix are used to specify the status of the response variable:
-
‘
R[i, j] = 0
’ means thaty_{ij}
is inside the open interval(lo[j], up[j])
; -
‘
R[i, j] = -1
’ means thaty_{ij}
is a left-censored value; -
‘
R[i, j] = +1
’ means thaty_{ij}
is a right-censored value; -
‘
R[i, j] = +9
’ means thaty_{ij}
is a missing value.
Value
event
returns a (n\times p)
-dimensional matrix.
Author(s)
Luigi Augugliaro (luigi.augugliaro@unipa.it)
References
Augugliaro L., Sottile G., Wit E.C., and Vinciotti V. (2023) <doi:10.18637/jss.v105.i01>. cglasso: An R Package for Conditional Graphical Lasso Inference with Censored and Missing Values. Journal of Statistical Software 105(1), 1–58.
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>.
\ell_1
-Penalized censored Gaussian graphical model.
Biostatistics 21, e1–e16.
See Also
Examples
set.seed(123)
# Y ~ N(b0 + XB, Sigma) and
# 1. probability of left/right censored values equal to 0.05
# 2. probability of missing-at-random euqals to 0.05
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)
rho <- 0.3
Sigma <- outer(1L:p, 1L:p, function(i, j) rho^abs(i - j))
Z <- rcggm(n = n, b0 = b0, X = X, B = B, Sigma = Sigma, probl = 0.05,
probr = 0.05, probna = 0.05)
# status indicator matrix
event(Z)
# in this case the status indicator matrix is returned with
# rows ordered according to the patterns of missing data
event(Z, ordered = TRUE)