Learn R Programming

RSNPset (version 0.5.3)

summary.RSNPset: RSNPset Analysis Summary Function

Description

Summary function to display execution information from rsnpset().

Usage

# S3 method for RSNPset
summary(object, verbose=TRUE, ...)

Arguments

object

Result from rsnpset(), an "RSNPset" S3 class object. Required.

verbose

Boolean indicating if additional information about the results should be reported. Default is TRUE.

...

Additional arguments affecting the summary produced.

Value

If rsnpset() was run with pinv.check=TRUE, a list of data.frame objects is returned, each containing the following diagnostic measures of the calculated Penrose-Moore inverses for the observed and permutation results.

Column Absolute largest element of:
d0 \(\Sigma - \bm{QDQ}\)
d1 \(\Sigma \Sigma^{+} \Sigma - \Sigma\)
d2 \(\Sigma^{+} \Sigma \Sigma^{+} - \Sigma^{+}\)
d2 \((\Sigma \Sigma^{+})^T - \Sigma \Sigma^{+}\)
d4 \((\Sigma^{+} \Sigma)^T - \Sigma^{+} \Sigma \)

where \(\bm{QDQ}\) is the spectral decomposition of \(\Sigma\). Departure of these values from zero indicates poor performance of the Penrose-Moore inverse. If rsnpset() was run with pinv.check=FALSE, the function returns NA.

Details

If verbose=TRUE, prints a summary of the execution conditions of rsnpset(). The default report includes:

  • The number of samples (the length of the rsnpset() argument Y).

  • The range in sizes of the analyzed SNP sets.

  • The number of SNP sets not analyzed (e.g., due to not containing any valid SNPs).

  • The number of SNP sets containing SNPs not used in the analysis (e.g., due to being missing from the data).

If resampling replicates were generated, the report will also include:

  • The method and number of resampling replicates computed (i.e. the value of the rsnpset() arguments r.method and B).

  • Whether or not the ranks of the variance matrices of permutation replicates are included in the results (i.e. the value of the rsnpset() argument ret.rank).

  • Whether or not the variance matrices were recomputed for each permutation replicate (i.e. the value of the rsnpset() argument v.permute).

If rsnpset() was run with pinv.check=TRUE, the value of the argument pinv.tol will also be reported.

See Also

The function rsnpset provides a description of the meaning of these reported values, as well as an explanation as to how they influence the results.

Examples

Run this code
# NOT RUN {
n <- 200    # Number of patients
m <- 1000   # Number of SNPs

set.seed(123)
G <- matrix(rnorm(n*m), n, m)   # Normalized SNP expression levels
rsids <- paste0("rs", 1:m)      # SNP rsIDs 
colnames(G) <- rsids
 
K <- 15                         # Number of SNP sets
genes <- paste0("XYZ", 1:K)     # Gene names 
gsets <- lapply(sample(3:50, size=K, replace=TRUE), sample, x=rsids)
names(gsets) <- genes

# Survival outcome
time <- rexp(n, 1/10)           # Survival time
event <- rbinom(n, 1, 0.9)      # Event indicator

# }
# NOT RUN {
# Optional parallel backend
library(doParallel)
registerDoParallel(cores=8) 
# }
# NOT RUN {
# B >= 1000 is typically recommended
res <- rsnpset(Y=time, delta=event, G=G, snp.sets=gsets, 
               score="cox", B=50, r.method="permutation", 
               ret.rank=TRUE, pinv.check=TRUE)

pinvcheck <- summary(res)
pinvcheck[["Observed"]]
# }

Run the code above in your browser using DataLab