Tmc: Empirical null distribution of max T(h)

Description Usage Arguments Details Value Author(s) References Examples

View source: R/Tmc.R

Description

The function uses Monte Carlo permutations to calculate the empirical distribution of max T(h)=T(hmax) under the null hypothesis of independence among the experiments. An empirical p-value is calculated to evaluate where T(hmax) is located under the null distribution.

Usage

1
Tmc(iter = 1000, output.ratio)

Arguments

iter

Number of iteration to be performed

output.ratio

The output object from the ratio function

Details

This function uses Monte Carlo permutations to calculate the empirical distribution of the maximum of T(h) (i.e. T(hmax)) under the null hypothesis of independence among the experiments. While the p-values* for the first list are fixed, the ones for the other lists are independently permutate B times. In this way, any relationship among the lists is destroyed. At each permutation b (b varies from 1 to B) a Tb(h) is calculated for each h and a maximum statistic Tb(hmax) is returned; its distribution represents the null distribution of T(hmax) under the condition of independence. The relative frequency of Tb(hmax) larger than T(hmax) identifies the p-value: it returns the proportion of Tb(hmax) from permuted dataset greater than the observed one (so indicates where the observed T(hmax) is located under the null distribution).

* instead of the p-values any other measure used to rank the features in the experiments can be used

Value

Returns the empirical pvalue from testing T(hmax) and a plot of the Tb(hmax) distribution. The same plot is also saved in the directory specified by the user.

Author(s)

Alberto Cassese, Marta Blangiardo

References

Stone et al.(1988), Investigations of excess environmental risks around putative sources: statistical problems and a proposed test,Statistics in Medicine, 7, 649-660.

M.Blangiardo and S.Richardson (2007) Statistical tools for synthesizing lists of differentially expressed features in related experiments, Genome Biology, 8, R54.

Examples

1
2
3
4
5
data = simulation(n=500,GammaA=1,GammaB=1,
r1=0.5,r2=0.8,DEfirst=300,DEsecond=200,
DEcommon=100)
Th<- ratio(data=data$Pval)
MC<- Tmc(iter=50,output.ratio=Th)

sdef documentation built on May 18, 2018, 1:08 a.m.