summary.datacggm: Summarizing Objects of Class "datacggm"

View source: R/datacggm_S3methods.R

summary.datacggmR Documentation

Summarizing Objects of Class ‘datacggm

Description

The function ‘summary.datacggm’ produces summaries of an object of class ‘datacggm’.

Usage

## S3 method for class 'datacggm'
summary(object, n, quantile.type = 7L, digits = 3L, quote = FALSE, ...)

Arguments

object

an object of class ‘datacggm’ for which a summary is desired.

n

maximum number of rows printed on video. By default all rows are printed.

quantile.type

an integer between 1 and 9 selecting one of the nine quantile algorithms (see also quantile function).

digits

integer, used for number formatting with ‘format()’.

quote

logical, indicating whether or not strings should be printed with surrounding quotes.

...

further arguments passed to print.listof.

Details

The function ‘summary.datacggm’ extends the results given by ‘summary.matrix()’ taking into account the specific structure of an object of class ‘datacggm’. Summary statistics are printed out in two sections: the first section reports the summary statistics for the response matrix ‘Y’, whereas the second section is devoted to summarising the matrix of predictors ‘X’.

For each response variable, the first section reports the standard summary statistics computed using only the observed values, that is the entries of the response matrix whose status indicators are equals to zero (see ‘event’ for more details), together with the information about the lower and upper censoring values (columns named Lower and Upper) and the percentage of missing-at-random, left-censored and right-censored response values (columns named NA%, LC% and RC%, respectively).

The second section is divided into two subsections reporting the main summary statistics computed for numeric and categorical predictors, respectively.

The two sections are printed out in such a way that the readability of the summary statistics is improved in a high-dimensional setting, that is, when the number of predictors and response variables exceeds the sample size.

Value

summary.dataccgm’ returns a named list with components

Y

a matrix with class ‘table’ obtained by computing the summary measures on the response variables.

X.numeric

a matrix with class ‘table’ obtained by computing the summary measures on the numeric predictors.

X.categorical

a list containing the summary measures on the categorical predictors.

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. (2020a) <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. (2020b) <doi: 10.1093/biostatistics/kxy043>. l1-Penalized censored Gaussian graphical model. Biostatistics 21, e1–e16.

See Also

datacggm, rcggm and event.

Examples

set.seed(123)

# case 1: Y ~ N(0, Sigma) 
# 1. probability of left/right censored values equal to 0.05
# 2. probability of missing-at-random equals to 0.05
n <- 50L
p <- 100L
rho <- 0.3
Sigma <- outer(1L:p, 1L:p, function(i, j) rho^abs(i - j))
Z <- rcggm(n = n, Sigma = Sigma, probl = 0.05, probr = 0.05, probna = 0.05)
summary(Z, max = n * p)

# case 2: Y ~ N(b0 + XB, Sigma) and
# 1. probability of left/right censored values equal to 0.05
# 2. probability of missing-at-random equals to 0.05
n <- 50L
p <- 100L
q <- 100L
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)
summary(Z)
summary(Z, max = n * p)

cglasso documentation built on Jan. 17, 2023, 5:10 p.m.