transf.Rd
Estimates the lambda value for data transformation
transf(response, f1, f2 = NA, f3 = NA, block = NA, line = NA, column = NA)
Numerical vector containing the response of the experiment.
Numeric or complex vector with factor 1 levels
Numeric or complex vector with factor 2 levels
Numeric or complex vector with factor 3 levels
Numerical or complex vector with blocks
Numerical or complex vector with lines
Numerical or complex vector with columns
Returns the value of lambda and/or data transformation approximation, according to Box-Cox (1964)
Box, G. E., Cox, D. R. (1964). An analysis of transformations. Journal of the Royal Statistical Society: Series B (Methodological), 26(2), 211-243.
#================================================================
# Completely randomized design
#================================================================
data("pomegranate")
with(pomegranate, transf(WL,f1=trat))
#>
#> ------------------------------------------------
#> Box-Cox Transformation (1964)
#>
#> Lambda=-0.8686869
#> ------------------------------------------------
#> Suggestion:
#> 1/Y
#>
#> ou:Yt=(Y^lambda-1)/lambda
#================================================================
# Randomized block design
#================================================================
data(soybean)
with(soybean, transf(prod, f1=cult, block=bloc))
#>
#> ------------------------------------------------
#> Box-Cox Transformation (1964)
#>
#> Lambda=2
#> ------------------------------------------------
#> Suggestion:
#>
#>
#> ou:Yt=(Y^lambda-1)/lambda
#================================================================
# Completely randomized design in double factorial
#================================================================
data(cloro)
with(cloro, transf(resp, f1=f1, f2=f2))
#>
#> ------------------------------------------------
#> Box-Cox Transformation (1964)
#>
#> Lambda=0.5454545
#> ------------------------------------------------
#> Suggestion:
#> square root (sqrt(Y))
#>
#> ou:Yt=(Y^lambda-1)/lambda
#================================================================
# Randomized block design in double factorial
#================================================================
data(cloro)
with(cloro, transf(resp, f1=f1, f2=f2, block=bloco))
#>
#> ------------------------------------------------
#> Box-Cox Transformation (1964)
#>
#> Lambda=0.5050505
#> ------------------------------------------------
#> Suggestion:
#> square root (sqrt(Y))
#>
#> ou:Yt=(Y^lambda-1)/lambda