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 fastJT object that is the return of method fastJT. Required.

Y2Print

Either a numeric or character vector that indicates the desired dependent variables to print. The default is 1:10. Set to NA to print full results. Optional.

X2Print

Either a numeric or character vector that indicates the desired independent variables to print. If outTopN=NA in function fastJT, i.e., the results are not sorted, both numeric and character vectors can be used to set the print range. The default range is 1:10. Set to NA to print full results. If outTopN!=NA in function fastJT, the range of X2Print refers to the range of top normalized statistics computed in fastJT, and only numeric vectors can be used. Optional.

printP

A boolean indicating whether to print the p-values (TRUE) or the standardized statistics (FALSE). The default value is TRUE. Optional.

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 outTopN=NA in function fastJT). Optional. The default value is NA.

subObj

A boolean indicating whether to return a fastJT object subset per the requested summary (TRUE). Optional. The default value is FALSE (nothing is returned).

...

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

fastJT, pvalues

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)

[Package fastJT version 1.0.6 Index]