Description Usage Arguments Value Author(s) References See Also Examples
This is an internal function run within MM framework. It completes the final stage of the MM framework, which builds the final model and estimates effects. As an internal function, it doesn't include extensive error testing of inputs. Please use cautiously if calling directly.
Works with PhenTestResult
object created by startModel
function.
The creation of MM final model is based on the significance of different fixed effects, depVariable and equation values
stored in PhenTestResult
object.
1 2 3 | finalModel(phenTestResult,
outputMessages = TRUE,
modelWeight = NULL)
|
phenTestResult |
instance of the |
outputMessages |
flag: "FALSE" value to suppress output messages; "TRUE" value to show output messages; default value TRUE |
modelWeight |
A vector of positive values for weights mainly used for appliying windowing to the data |
Returns results stored in instance of the PhenTestResult
class
Natalja Kurbatova, Natasha Karp, Jeremy Mason
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.
PhenTestResult
and testDataset
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | file <- system.file("extdata", "test1.csv", package="PhenStat")
test <- PhenStat:::PhenList(dataset=read.csv(file,na.strings = '-'),
testGenotype="Sparc/Sparc")
# when "testDataset" function's argument "callAll" is set to FALSE
# only "startModel" function is called - the first step of MM framework
result <- PhenStat:::testDataset(test,
depVariable="Lean.Mass",
equation="withoutWeight",
callAll=FALSE)
# print out formula that has been created
# result$model.formula.genotype
# print out batch effect's significance
# result$model.effect.batch
# change the model
# result <- PhenStat:::testDataset(test,
# depVariable="Lean.Mass",
# equation="withWeight",
# callAll=FALSE)
# print out new formula
#result$model.formula.genotype
# run the final model fitting when statisfied with the model
result <- PhenStat:::finalModel(result)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.