Creates PhenTestResult object based on test results or model building results.
Internal function for the package. Not build for users to directly call.
representing the model fit gls object or lme object
model.dataset
dataset used for modeling
depVariable
depending variable in the model
refGenotype
reference genotype in the model
equation
possible values: "withWeight" to include weight effect into model, "withoutWeight" to exclude weight effect from the model
method
possible values: "MM" to work with Mixed Model framework, "FE" to work with Fisher Exact Test framework
model.effect.batch
Result of the test for batch effect significance
model.effect.variance
Result of the test for residual variance effect
model.effect.sex
Result of the test for sex effect significance
model.effect.weight
Result of the test for weight effect significance
model.effect.interaction
Result of the test for genotype by sex interaction significance
model.output.interaction
Interaction test result: p-value
numberSexes
number of possible sex values in the dataset
pThreshold
p-value threshold used to evaluate the effect significance, default value 0.05
model.formula.null
formula for the model without genotype effect
model.formula.genotype
formula for the model with genotype effect
model.output.genotype.nulltest.pVal
Genotype test results: p-value
model.output.quality
vector that contains diagnostic test output for mixed model quality of fit
model.output.summary
named vector that contains summary of the model output
model.output.averageRefGenotype
named vector that contains mean values calculated for reference genotype records
model.output.percentageChanges
named vector that contains percentage changes values per sex
Value
Returns an 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 ONE7(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
PhenTestResult
Examples
file <- system.file("extdata", "test1.csv", package="PhenStat")
test <- PhenList(dataset=read.csv(file),
testGenotype="Sparc/Sparc")
# "testDataset" function calls "PhenTestResult" function internally
result <- testDataset(test,
equation="withoutWeight",
depVariable="Lean.Mass")
class(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/PhenTestResult.Rd_%03d_medium.png", width=480, height=480)
> ### Name: PhenTestResult
> ### Title: Method "PhenTestResult"
> ### Aliases: PhenTestResult
>
> ### ** 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'
> # "testDataset" function calls "PhenTestResult" function internally
> result <- testDataset(test,
+ equation="withoutWeight",
+ depVariable="Lean.Mass")
Information:
Dependent variable: 'Lean.Mass'.
Information:
Perform all MM framework stages: startModel and finalModel.
Information:
Method: Mixed Model framework.
Information:
Equation: 'withoutWeight'.
Information:
Calculated values for model effects are: keepBatch=TRUE, keepEqualVariance=TRUE, keepWeight=FALSE, keepSex=TRUE, keepInteraction=FALSE.
> class(result)
[1] "PhenTestResult"
attr(,"package")
[1] "PhenStat"
>
>
>
>
>
> dev.off()
null device
1
>