Learn R Programming

PhenStat (version 2.6.0)

JSONOutput: Method "JSONOutput"

Description

Wrapper for the model fitting results. Returns model fitting and testing results in a JSON format. Assumes that modelling results are stored in the PhenTestResult object (output from function testDataset).

Usage

JSONOutput(phenTestResult, phenotypeThreshold = 0.01)

Arguments

phenTestResult
instance of the PhenTestResult class that comes from the function testDataset; mandatory argument
phenotypeThreshold
a numerical value defining the threshold to use in classificationTag; default value 0.01

Value

Returns a vector with model fitting results in JSON format: model output summary and other values

See Also

PhenTestResult

Examples

Run this code
    # Mixed Model framework
    file <- system.file("extdata", "test1.csv", package="PhenStat")
    test <- PhenList(dataset=read.csv(file),
            testGenotype="Sparc/Sparc")
    result <- testDataset(test,
            depVariable="Lean.Mass")
    JSONOutput(result)
    
    # Fishe Exact Test framework
    file <- system.file("extdata", "test_categorical.csv", package="PhenStat")
    test2 <- PhenList(dataset=read.csv(file),
            testGenotype="Aff3/Aff3")
    result2 <- testDataset(test2,
            depVariable="Thoracic.Processes",
            method="FE")  
    JSONOutput(result2)

Run the code above in your browser using DataLab