boxcoxfr
estimates Box-Cox power transformation parameter. It is useful to use if the normality or/and the homogenity of variance is/are not satisfied while comparing two or more groups. While estimating transformation parameter, maximum likelihood estimation in feasible region (MLEFR) is used. MLEFR maximizes the likehood function in feasible region constructed by Shapiro-Wilk test and Bartlett's test. After transformation parameter is estimated, normality of groups and homogenity of variance are checked by Shapiro-Wilk test and Bartlett's test, respectively. Dag, O., Ilk, O. An Algorithm for Estimating Box-Cox Transformation Parameter in ANOVA. Communications in Statistics - Simulation and Computation, Accepted (June 16, 2016).
boxcoxfr(y, x, option = "both", lam = seq(-3, 3, 0.01), tau = 0.05, alpha = 0.05, verbose = TRUE)
Bartlett, M.S.(1937). Properties of Sufficiency and Statistical Tests. Proceedings of the Royal Society of London, Series A, 160, 268-282.
Box, G.E.P., Cox, D.R. (1964). An Analysis of Transformations (with discussion). Journal of The Royal Statistical Society, Series B (Methodological), 26, 211-252.
Dag, O., Ilk, O. An Algorithm for Estimating Box-Cox Transformation Parameter in ANOVA. Communications in Statistics - Simulation and Computation, Accepted (June 16, 2016).
Shapiro, S.S., Wilk, M.B. (1965). An Analysis of Variance Test for Normality (Complete Samples). Biometrika, 52(3/4), 591-611.
data(AADT)
attach(AADT)
out=boxcoxfr(aadt, class)
out$shapiro
out$bartlett
out$tf.data # transformed data set
data = rnorm(120, 10, 1)
factor = rep(c("X", "Y", "Z"), each = 40)
boxcoxfr(data, factor, lam = seq(-5, 5, 0.01), tau = 0.01, alpha = 0.01)
Run the code above in your browser using DataLab