Last data update: 2014.03.03

R: Function to compute T-statistic and p-value in meta-analysis
meta.testR Documentation

Function to compute T-statistic and p-value in meta-analysis

Description

Function meta.test returns a list with two slots: data frame of test statistics and data frame of p-values. In each of the matrices rows correspond to genes and columns to data sets.

Usage

meta.test(x, varname, stat = "t")

Arguments

x

MetaArray object

varname

A String indicating which column of clinical data matrices should be used as class labels. Column of such name must be present in all datasets. It must not be a binary vector (0's and 1's)

stat

A character String indicating the type of test statistic to be computed as used in mt.teststat function

Value

A list with two slots:

test

A data frame of statistics in which rows correspond to genes and columns to data sets

p

A data frame of p-values (only if test="t" returned) in which rows correspond to genes and columns to data sets

Author(s)

Ivana Ihnatova

Examples

data(Singhdata)

cl1<-as.data.frame(Singhdata$classes[[1]]+1)
names(cl1)<-"classlab"
cl2<-as.data.frame(Singhdata$classes[[2]]+1)
names(cl2)<-"classlab"
cl3<-as.data.frame(Singhdata$classes[[3]]+1)
names(cl3)<-"classlab"
rownames(Singhdata$esets[[1]])<-Singhdata$geneNames
rownames(Singhdata$esets[[2]])<-Singhdata$geneNames
rownames(Singhdata$esets[[3]])<-Singhdata$geneNames

data<-new("MetaArray", GEDM=list(Singhdata$esets[[1]], Singhdata$esets[[2]], Singhdata$esets[[3]]),
clinical=list(cl1, cl2, cl3), datanames=c("dataset1", "dataset2", "dataset3"))

m<-meta.test(data,"classlab")

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(MAMA)
Loading required package: genefilter
Loading required package: metaMA

Attaching package: 'metaMA'

The following object is masked from 'package:genefilter':

    rowVars

Loading required package: xtable
Loading required package: multtest
Loading required package: BiocGenerics
Loading required package: parallel

Attaching package: 'BiocGenerics'

The following objects are masked from 'package:parallel':

    clusterApply, clusterApplyLB, clusterCall, clusterEvalQ,
    clusterExport, clusterMap, parApply, parCapply, parLapply,
    parLapplyLB, parRapply, parSapply, parSapplyLB

The following objects are masked from 'package:stats':

    IQR, mad, xtabs

The following objects are masked from 'package:base':

    Filter, Find, Map, Position, Reduce, anyDuplicated, append,
    as.data.frame, cbind, colnames, do.call, duplicated, eval, evalq,
    get, grep, grepl, intersect, is.unsorted, lapply, lengths, mapply,
    match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, rank,
    rbind, rownames, sapply, setdiff, sort, table, tapply, union,
    unique, unsplit

Loading required package: Biobase
Welcome to Bioconductor

    Vignettes contain introductory material; view with
    'browseVignettes()'. To cite Bioconductor, see
    'citation("Biobase")', and for packages 'citation("pkgname")'.

Loading required package: gtools
Loading required package: grid
Loading required package: GeneMeta

Attaching package: 'MAMA'

The following objects are masked from 'package:GeneMeta':

    multExpFDR, zScoreFDR, zScorePermuted, zScores

> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/MAMA/meta.test.Rd_%03d_medium.png", width=480, height=480)
> ### Name: meta.test
> ### Title: Function to compute T-statistic and p-value in meta-analysis
> ### Aliases: meta.test
> ### Keywords: htest
> 
> ### ** Examples
> 
> data(Singhdata)
> 
> cl1<-as.data.frame(Singhdata$classes[[1]]+1)
> names(cl1)<-"classlab"
> cl2<-as.data.frame(Singhdata$classes[[2]]+1)
> names(cl2)<-"classlab"
> cl3<-as.data.frame(Singhdata$classes[[3]]+1)
> names(cl3)<-"classlab"
> rownames(Singhdata$esets[[1]])<-Singhdata$geneNames
> rownames(Singhdata$esets[[2]])<-Singhdata$geneNames
> rownames(Singhdata$esets[[3]])<-Singhdata$geneNames
> 
> data<-new("MetaArray", GEDM=list(Singhdata$esets[[1]], Singhdata$esets[[2]], Singhdata$esets[[3]]),
+ clinical=list(cl1, cl2, cl3), datanames=c("dataset1", "dataset2", "dataset3"))
> 
> m<-meta.test(data,"classlab")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>