Last data update: 2014.03.03

R: Method "LRDataset"
LRDatasetR Documentation

Method "LRDataset"

Description

Prepares dataset for the LR framework - maps values of dependent variable to 0/1, where 1 is modeled.

Usage

    LRDataset(phenList = NULL, depVariable = NULL, abnormalValues =
            c("abnormal", "Abnormal", "TRUE", "deviant"),
            outputMessages = TRUE)

Arguments

phenList

instance of the PhenList class; mandatory argument

depVariable

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

abnormalValues

a list of abnormal values that will be mapped to 0; mandatory argument

outputMessages

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

Value

Returns dataset suitable for LR framework, where provided abonormal values are mapped to 1 and all other values of dependent variable are assumed to be normal and are mapped to 0.

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.

Examples

    file <- system.file("extdata", "testLR.csv", package="PhenStat")
    testLR <- PhenList(dataset=read.csv(file),
            testGenotype="Mock")
    testLR2 <- LRDataset(testLR,"V2")

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

Warning:
Dataset's 'Weight' column is missed.
You can define 'dataset.colname.weight' argument to specify column for the weight effect modeling.

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

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

Warning:
Weight column is not present in the database.

>     testLR2 <- LRDataset(testLR,"V2")
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>