Description Usage Arguments Value Author(s) Examples
View source: R/transformation.R
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
1 2 3 | determiningLambda(phenList,
depVariable,
equation="withWeight")
|
phenList |
instance of the |
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" |
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
Natasha Karp
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.