summary.fastJT {fastJT} | R Documentation |
Summarize Jonckheere-Terpstra Test Statistics and P-Values
Description
Summary method for fastJT results.
Usage
## S3 method for class 'fastJT'
summary(object, Y2Print=1:10, X2Print=1:10, printP=TRUE,
outTopN=NA, subObj=FALSE, ...)
Arguments
object |
A |
Y2Print |
Either a numeric or character vector that indicates the desired dependent variables to print. The default is 1:10. Set to |
X2Print |
Either a numeric or character vector that indicates the desired independent variables to print. If |
printP |
A boolean indicating whether to print the p-values ( |
outTopN |
An integer specifying the number of top hits to print in the summary, if the statistics were not sorted during the evaluation of the statistics (i.e., if |
subObj |
A boolean indicating whether to return a |
... |
Additional arguments affecting the summary produced. |
Value
If subObj=TRUE
, this method returns a fastJT
object matching the subset of statistics from object
that are being printed. For example, if object
is not sorted by top hits, summary(object, outTopN=10, subObj=TRUE)
will print the summary and return a subset of object
that contains only the top 10 independent variables for each dependent variable. If subObj=FALSE
, the summary is printed but no values are returned.
Note
This function prints a matrix or paired columns of independent variable IDs and statistics/p-values to the log.
See Also
Examples
# Generate dummy data
num_patient <- 100
num_marker <- 10
num_SNP <- 500
set.seed(12345);
Mark <- matrix(rnorm(num_patient*num_marker), num_patient, num_marker)
Geno <- matrix(rbinom(num_patient*num_SNP, 2, 0.5), num_patient, num_SNP)
colnames(Mark) <- paste0("Mrk:",1:num_marker)
colnames(Geno) <- paste0("SNP:",1:num_SNP)
res <- fastJT(Y=Mark, X=Geno, outTopN=5)
summary(res, Y2Print=c("Mrk:1","Mrk:2"), X2Print=1:5, printP=FALSE)
summary(res, Y2Print=NA, X2Print=1:5, printP=FALSE)
res <- fastJT(Y=Mark, X=Geno, outTopN=NA)
summary(res, Y2Print=1:10, X2Print=1:10, printP=TRUE)
summary(res, Y2Print=c("Mrk:1","Mrk:2"), X2Print=c("SNP:1","SNP:2"), printP=TRUE)
res <- fastJT(Y=Mark, X=Geno, outTopN=NA, standardized=FALSE)
summary(res, outTopN=10)