determiningLambda: Method "determiningLambda"

Description Usage Arguments Value Author(s) Examples

View source: R/transformation.R

Description

Function role 1. Rescale data if needed (Box-Cox transformation can only be applied on data >0) 2. Calculate lambda value for a Box-Cox transformation 3. Assess whether transformation is required (if confidence interval includes 1 then no transformation required) 4. Return output to allow application of the transformation if necessary using the returned lambda value and any associated rescaling that was needed. 5. Requires a function that will be fitted determined from formulaAssessingBoxCox

Usage

1
2
3
    determiningLambda(phenList, 
					depVariable, 
					equation="withWeight")

Arguments

phenList

instance of the PhenList class; mandatory argument

depVariable

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

equation

a character string defining the equation to use. Possible values "withWeight" (default),"withoutWeight"

Value

Returns a vector with five elements: 1. 95 2. Midepoint of the 95 3. Calculated lambda value 4. TransformationRequired: TRUE/FALSE 5. Calculated scale shift value

Author(s)

Natasha Karp

Examples

1
2
3
4
        file <- system.file("extdata", "test1.csv", package="PhenStat")
        test <- PhenStat:::PhenList(dataset=read.csv(file,na.strings = '-'),
                testGenotype="Sparc/Sparc")
        PhenStat:::determiningLambda(test,"Lean.Mass",equation="withoutWeight")

PhenStat documentation built on Nov. 8, 2020, 8:13 p.m.