Description Usage Arguments Details Value Note See Also Examples
View source: R/summary.RSNPset.R
Summary function to display execution information from rsnpset()
.
1 2 |
object |
Result from |
verbose |
Boolean indicating if additional information about the results should be reported. Default is |
... |
Additional arguments affecting the summary produced. |
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.
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
.
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.
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.
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"]]
|
Loading required package: foreach
Loading required package: iterators
Loading required package: parallel
Loading required package: rngtools
Loading required package: pkgmaker
Loading required package: registry
- Efficient score statistics based on 200 samples.
- SNP sets range in size from 6 to 48.
- 0 SNP sets were not included in the analysis
- 0 SNP sets contained SNPs that were not included in the analysis.
- 50 permutation replicates were computed.
- ret.rank = TRUE : The ranks of the permutation variance matrices were returned.
- v.permute = FALSE : Variance was not recomputed for each permutation replicate.
- pinv.tol = 7.8e-08
d0 d1 d2 d3 d4
1 2.842171e-13 2.557954e-13 9.540979e-18 6.713380e-16 6.453171e-16
2 4.547474e-13 2.273737e-13 1.040834e-17 4.909267e-16 5.039372e-16
3 2.273737e-13 1.421085e-13 4.336809e-18 5.134781e-16 4.718448e-16
4 4.245493e-13 1.705303e-13 9.540979e-18 5.810782e-16 5.248081e-16
5 4.263256e-13 8.526513e-14 3.469447e-18 7.459311e-17 1.110223e-16
6 6.252776e-13 3.126388e-13 1.387779e-17 9.483516e-16 9.050920e-16
7 3.463896e-13 2.557954e-13 1.647987e-17 6.010817e-16 5.659535e-16
8 2.842171e-13 2.273737e-13 8.673617e-18 3.313322e-16 4.597017e-16
9 3.410605e-13 2.842171e-13 9.540979e-18 2.770137e-16 2.758210e-16
10 7.673862e-13 4.831691e-13 1.387779e-17 1.050375e-15 9.163677e-16
11 2.664535e-13 1.705303e-13 6.938894e-18 3.794708e-16 3.278627e-16
12 5.968559e-13 3.410605e-13 1.214306e-17 1.019475e-15 8.984783e-16
13 5.115908e-13 3.126388e-13 8.673617e-18 8.578208e-16 8.458945e-16
14 2.557954e-13 2.273737e-13 6.938894e-18 4.740132e-16 4.540639e-16
15 4.547474e-13 3.126388e-13 1.127570e-17 9.638557e-16 8.662775e-16
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.