Description Usage Arguments Details Value Note Author(s) References Examples
Trace regression coefficients' t-values or F-ratios for different values of λ in the Box-Cox transformation.
1 2 |
mod |
list. A list of class |
lambda |
numeric. The values of λ in the Box-Cox transformation. See Details. |
stat |
character. Either |
global |
logical. Applied only for |
cex |
numeric. Expansion factor used to label the trace lines. |
... |
additional graphical parameters passed to |
The response is transformed as
Y=(y^λ - 1)/λ
for each value of λ (lambda
) and the model refitted.
The t-values or F-ratios of the coefficients are saved for the display.
If global=TRUE
, then the F-ratio of the whole model is
plotted instead.
The function returns an invisible list with components:
lambda |
numeric. Vector of length |
t.lambda |
matrix ( |
f.lambda |
matrix ( |
For each value of λ the model is refitted. Computations can be done more efficiently and will be incorporated in future versions.
Ernesto Barrios
Box, G. E. P. and C. Fung (1995) "The Importance of Data Transformation in Designed Experiments for Life Testing". Quality Engineering, Vol. 7, No. 3, pp. 625-68.
Box G. E. P, Hunter, J. S. and Hunter, W. C. (2005). Statistics for Experimenters II. New York: Wiley.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | library(BHH2)
# Lambda Plot tracing t values.
data(woolen.data)
woolen.lm <- lm(y~x1+x2+x3+I(x1^2)+I(x2^2)+I(x3^2)+
I(x1*x2)+I(x1*x3)+I(x2*x3)+I(x1*x2*x3),data=woolen.data)
lambdaPlot(woolen.lm,cex=.8,stat="t")
# Lambda Plot tracing F values.
woolen2.lm <- lm(y~x1+x2+x3,data=woolen.data)
lambdaPlot(woolen2.lm,lambda=seq(-1,1,length=41),stat="F",global=TRUE)
# Lambda Plot tracing F values.
data(poison.data)
poison.lm <- lm(y~treat*poison,data=poison.data)
lambdaPlot(poison.lm,lambda=seq(-3,1,by=.1),stat="F",global=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.