Last data update: 2014.03.03

R: Method "RRTest"
RRTestR Documentation

Method "RRTest"

Description

This is an internal function run within RR framework. It performs Reference Ranges Plus test and after that Fisher Exact test on calculated count matrices. As an internal function, it doesn't include extensive error testing of inputs. Please use cautiously if calling directly.

Works with PhenList object created by PhenList function.

Usage

    RRTest(phenList, depVariable, outputMessages=TRUE, naturalVariation=95, controlPointsThreshold=60)

Arguments

phenList

instance of the PhenList class; mandatory argument

depVariable

a character string defining the dependent variable of interest; mandatory argument

outputMessages

flag: "FALSE" value to suppress output messages; "TRUE" value to show output messages; default value TRUE

naturalVariation

number defining the natural variation range in percents for normal values; default value 95

controlPointsThreshold

number defining how many control points is needed to perform RR plus method; default value 60

Value

Returns results stored in instance of the PhenTestResult class

Author(s)

Natalja Kurbatova, Natasha Karp, Jeremy Mason

References

Karp N, Melvin D, Sanger Mouse Genetics Project, Mott R (2012): Robust and Sensitive Analysis of Mouse Knockout Phenotypes. PLoS ONE 7(12): e52410. doi:10.1371/journal.pone.0052410

West B, Welch K, Galecki A (2007): Linear Mixed Models: A practical guide using statistical software New York: Chapman & Hall/CRC 353 p.

See Also

PhenList and testDataset

Examples

    file <- system.file("extdata", "test1.csv", package="PhenStat")
    test <- PhenList(dataset=read.csv(file),
            testGenotype="Sparc/Sparc")
    # "RRTest" function is called from "testDataset" function
    result <- testDataset(test,
            depVariable="Lean.Mass",
            method="RR")
    # RR test results can be printed out using function "summaryOutput"
    summaryOutput(result)

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(PhenStat)
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/PhenStat/RRTest.Rd_%03d_medium.png", width=480, height=480)
> ### Name: RRTest
> ### Title: Method "RRTest"
> ### Aliases: RRTest
> 
> ### ** Examples
> 
>     file <- system.file("extdata", "test1.csv", package="PhenStat")
>     test <- PhenList(dataset=read.csv(file),
+             testGenotype="Sparc/Sparc")
Warning:
Dataset's column 'Assay.Date' has been renamed to 'Batch' and will be used for the batch effect modelling.

Information:
Dataset's 'Genotype' column has following values: '+/+', 'Sparc/Sparc'

Information:
Dataset's 'Sex' column has following value(s): 'Female', 'Male'

>     # "RRTest" function is called from "testDataset" function
>     result <- testDataset(test,
+             depVariable="Lean.Mass",
+             method="RR")
Information:
Dependent variable: 'Lean.Mass'.

Information:
Method: Reference Ranges Plus framework with filtered dataset.

>     # RR test results can be printed out using function "summaryOutput"
>     summaryOutput(result)

Test for dependent variable:
*** Lean.Mass ***

Method:
*** Reference Ranges Plus framework ***


1) High vs Normal/Low
           All Females only Males only
p-value 1.0000       1.0000     1.0000
ES          3%           3%         3%

2) Low vs Normal/High
           All Females only Males only
p-value 0.0120       0.0198     0.2510
ES         17%          26%         9%

----------------------------------------------------------------------------
Classification Tag
----------------------------------------------------------------------------
Not significant

----------------------------------------------------------------------------
Thresholds
----------------------------------------------------------------------------
                                               
Natural variation:            95               
Min control points:           60               
Normal values 'males only':   18.830 to 26.630 
Normal values 'females only': 15.586 to 20.6035

----------------------------------------------------------------------------
Count Matrices
----------------------------------------------------------------------------
All
            +/+ Sparc/Sparc
Low          13           3
Normal/High 435          12


All
           +/+ Sparc/Sparc
High        12           0
Normal/Low 436          15


Females only
            +/+ Sparc/Sparc
Low           6           2
Normal/High 221           5


Males only
            +/+ Sparc/Sparc
Low           7           1
Normal/High 214           7


Females only
           +/+ Sparc/Sparc
High         6           0
Normal/Low 221           7


Males only
           +/+ Sparc/Sparc
High         6           0
Normal/Low 215           8


> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>