Last data update: 2014.03.03

R: Calculation of classical multiple testing statistics and...
raw.pvaluesR Documentation

Calculation of classical multiple testing statistics and p-values

Description

Calculates for each gene expression, the Fisher test statistics and the corresponding p-value for H0: the gene expression does not depend on the experimental condition in a model with possible covariates.

Usage

raw.pvalues(data, x = 1, test = x[1])

Arguments

data

'FAMTdata' object, see as.FAMTdata

x

Column number(s) corresponding to the experimental condition and the optional covariates (1 by default) in the 'covariates' data frame.

test

Column number corresponding to the experimental condition (x[1] by default) of interest in the multiple testing procedure.

Value

pval

Vector containing the p-values

test

Vector containing the F statistics

resdf

Residual degrees of freedom

Author(s)

David Causeur

See Also

as.FAMTdata

Examples

data(expression)
data(covariates)
data(annotations)

# Create the 'FAMTdata'
############################################
chicken = as.FAMTdata(expression,covariates,annotations,idcovar=2)
# 'FAMTdata' summary
summaryFAMT(chicken)

# Calculation of classical p-values
############################################
# test on the 6th covariate: 
rawpval = raw.pvalues(chicken,x=6)
hist(rawpval$pval)

# with a supplementary covariate (third column of the covariates data frame)
## Not run: rawpval = raw.pvalues(chicken,x=c(3,6),test=6)
## Not run: hist(rawpval$pval)

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(FAMT)
Loading required package: mnormt
Loading required package: impute
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/FAMT/raw.pvalues.Rd_%03d_medium.png", width=480, height=480)
> ### Name: raw.pvalues
> ### Title: Calculation of classical multiple testing statistics and
> ###   p-values
> ### Aliases: raw.pvalues
> 
> ### ** Examples
> 
> data(expression)
> data(covariates)
> data(annotations)
> 
> # Create the 'FAMTdata'
> ############################################
> chicken = as.FAMTdata(expression,covariates,annotations,idcovar=2)
$`Rows with missing values`
integer(0)

$`Columns with missing values`
integer(0)

> # 'FAMTdata' summary
> summaryFAMT(chicken)
$expression
$expression$`Number of tests`
[1] 9893

$expression$`Sample size`
[1] 43


$covariates
 AfClass   ArrayName        Mere    Lot         Pds9s            Af          
 F :18   F10    : 1   GMB05555:10   L2:16   Min.   :1994   Min.   :-25.5397  
 L :19   F11    : 1   GMB05625: 7   L3:11   1st Qu.:2284   1st Qu.: -8.0042  
 NC: 6   F12    : 1   GMB05562: 5   L4: 8   Median :2371   Median :  2.7166  
         F13    : 1   GMB05599: 5   L5: 8   Mean   :2370   Mean   :  0.2365  
         F14    : 1   GMB05554: 4           3rd Qu.:2474   3rd Qu.:  8.6037  
         F15    : 1   GMB05589: 4           Max.   :2618   Max.   : 18.1024  
         (Other):37   (Other) : 8                                            

$annotations
         ID      
 RIGG00001:   1  
 RIGG00002:   1  
 RIGG00003:   1  
 RIGG00005:   1  
 RIGG00006:   1  
 RIGG00007:   1  
 (Other)  :9887  
                                                                           Name     
 Weakly similar to Q95JC9 (Q95JC9) Basic proline-rich protein                :  11  
 No Match                                                                    :   8  
 Weakly similar to Q90811 (Q90811) Hypothetical 28.6 kDa protein (Fragment)  :   8  
 Weakly similar to Q9DDJ7 (Q9DDJ7) Retinoblastoma tumor suppressor (Fragment):   8  
 Weakly similar to Q08525 (Q08525) Reverse transcriptase                     :   6  
 Weakly similar to Q8MW53 (Q8MW53) Precollagen-D                             :   6  
 (Other)                                                                     :9846  
     Block           Column           Row            Length     
 Min.   : 1.00   Min.   : 1.00   Min.   : 1.00   Min.   :60.00  
 1st Qu.:13.00   1st Qu.: 6.00   1st Qu.: 6.00   1st Qu.:70.00  
 Median :25.00   Median :11.00   Median :12.00   Median :70.00  
 Mean   :24.87   Mean   :11.04   Mean   :11.63   Mean   :69.57  
 3rd Qu.:37.00   3rd Qu.:16.00   3rd Qu.:17.00   3rd Qu.:70.00  
 Max.   :48.00   Max.   :21.00   Max.   :22.00   Max.   :75.00  
                                                                

> 
> # Calculation of classical p-values
> ############################################
> # test on the 6th covariate: 
> rawpval = raw.pvalues(chicken,x=6)
> hist(rawpval$pval)
> 
> # with a supplementary covariate (third column of the covariates data frame)
> ## Not run: rawpval = raw.pvalues(chicken,x=c(3,6),test=6)
> ## Not run: hist(rawpval$pval)
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>