Last data update: 2014.03.03

R: Calculation of test statistic
TestStatSPR Documentation

Calculation of test statistic

Description

Calculates the test statistic for RepeatedHighDim in the case of unpaired samples.

Usage

  TestStatSP(Y1, Y2)

Arguments

Y1

Matrix of expression levels in first group. Rows represent features (e.g. genes, proteins,...), columns represent samples.

Y2

Matrix of expression levels in second group. Rows represent features (e.g. genes, proteins,...), columns represent samples.

Value

A list containing the following items:

k

Indicates whether the paired or unpaired case was tested.

d

Number of features.

n1

Number of samples in group 1.

n2

Number of samples in group 2.

Fn

Test statistic.

f

First degree of freedoms.

f2

Second degree of freedom.

p

p-value.

Author(s)

Klaus Jung Klaus.Jung@ams.med.uni-goettingen.de

References

  • Brunner, E (2009) Repeated measures under non-sphericity. Proceedings of the 6th St. Petersburg Workshop on Simulation, 605-609.

  • Jung K, Becker B, Brunner B and Beissbarth T (2011) Comparison of Global Tests for Functional Gene Sets in Two-Group Designs and Selection of Potentially Effect-causing Genes. Bioinformatics, 27: 1377-1383.

Examples

### Global comparison of a set of 100 genes between two experimental groups.
X1 = matrix(rnorm(1000, 0, 1), 10, 100)
X2 = matrix(rnorm(1000, 0.1, 1), 10, 100)
RHD = RepeatedHighDim(X1, X2, paired=FALSE)
summary(RHD)

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(RepeatedHighDim)
Loading required package: MASS
Loading required package: nlme
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/RepeatedHighDim/TestStatSP.Rd_%03d_medium.png", width=480, height=480)
> ### Name: TestStatSP
> ### Title: Calculation of test statistic
> ### Aliases: TestStatSP
> 
> ### ** Examples
> 
> ### Global comparison of a set of 100 genes between two experimental groups.
> X1 = matrix(rnorm(1000, 0, 1), 10, 100)
> X2 = matrix(rnorm(1000, 0.1, 1), 10, 100)
> RHD = RepeatedHighDim(X1, X2, paired=FALSE)
> summary(RHD)
Number of Genes: 10 
Number of Samples in Group 1: 100 
Number of Samples in Group 2: 100 
Samples are Paired: FALSE 

  effect      F    df1      df2      p
1  Group 0.5715 9.9688 2028.209 0.8379
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>