summary.RSNPset: RSNPset Analysis Summary Function

Description

Summary function to display execution information from rsnpset().

Usage

1
2
## S3 method for class '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.

Details

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

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

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

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 Σ - QDQ
d1 V%*%Σ%*%V-V
d2 Σ%*%V%*%Σ-Σ
d2 t(V%*%Σ)-V%*%Σ
d4 t(Σ%*%V)-Σ%*%V

where QDQ is the spectral decomposition of V. 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.

Note

If pinv.check=TRUE and the number of permutations is large, the user may wish to capture the resulting diagnostic measures in an object for examination, as in the example below, as opposed to having them printed.

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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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) 
## End(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"]]

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.