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"]]
``` |

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

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