Box-Cox Transformation Analysis

DESCRIPTION:
Produces loglikelihood values and t-values for a sequence of Box-Cox transformations of the response. From the plots and output of this function, the user can examine whether transformation of the response could lead to a simpler model.

USAGE:
boxcox(x, formula, n.effects, sig=.05, method="pse",
          minlam=-1, maxlam=1, nlam=21)

REQUIRED ARGUMENTS:
x:
the output from fitting a fractional factorial model using fac.aov.

OPTIONAL ARGUMENTS:
formula:
formula or terms describing a reduced model. Only one of formula or n.effects (see below) may be specified.
n.effects:
integer or "sig" specifying number of effects to be fitted in the reduced model. If n.effects is an integer the n.effects largest terms are used in the reduced model, with the rest used to estimate variance. If n.effects = "sig", significant terms are included in the model, where significance is determined by the values of sig and method.
sig:
value giving the significance level for the effects, when n.effects = "sig".
method:
the method used to estimate variance when n.effects = "sig". "pse" uses a pseudo standard error estimate. "tse" uses the 60% trimmed standard error of the effects. "ase" uses the adaptive standard error estimate.
minlam:
value for smallest lambda in the Box-Cox transformations.
maxlam:
value for largest lambda in the Box-Cox transformations.
nlam:
integer giving number of lambda values between minlam and maxlam.

VALUE:
an object of class "boxcox" with the following components:
lambda:
vector of lambda values.
bestlam:
lambda value for the minimum residual sum of squares.
rssl:
vector of residual sums of squares from the Box-Cox transformation fit corresponding to component lambda.
minrssl:
minimum residual sums of squares of the transformations.
tvals:
matrix of tvalues of effects in the transformed model, with nlam rows and one column for the effects given by n.effects.
loglik:
vector of log likelihood values corresponding to the component lambda.
logliklam:
log likelihood corresponding to the minimum residual sums of squares of the transformations.
lcl:
lower 95% confidence limit for logliklam.
enames:
vector of names of the effects in the model.
nefflag:
flag for method used to give effects in reduced model. Set to "largest" if length(n.effects)=1; "model" if length(n.effects) > 1; "sig" if n.effects="sig"; "formula" if formula was used instead of n.effects.
neff:
the number of effects in the reduced model.
df:
number of degrees of freedom for error in the reduced model.

METHODS:
See Box, Hunter and Hunter (1978) p. 239 or Haaland (1989) Chapter 6 for details.

WARNING:
If the value of formula or n.effects leads to a reduced model with all terms of the full model produced from fac.aov, there must either be replication in the design or the model must not be saturated. Otherwise boxcox will not be able to estimate the residual sums of squares for the various transformations.

REFERENCES:
Box, G.E.P (1988) Signal-to-noise ratios, performance criteria, and transformations. Technometrics, 30:1-17.

Box, G.E.P. and D.R. Cox (1964) An analysis of transformations (with discussion). J. Royal Statist. Soc. Ser. B, 26:211-246

Box, G.E.P. and C.A. Fung (1983) Some considerations in estimating data transformations. MRC Report #2609, University of Wisconsin-Madison.

Box, G.E.P. and C.A. Fung (1986) Studies in quality improvement: Minimizing transmitted variation by parameter design. Report 8, University of Wisconsin-Madison, Center for Quality and Productivity Improvement (submitted to the Journal of Quality Technology).

Box, G. E. P., W. G. Hunter, and J. S. Hunter (1978) Statistics for Experimenters, New York: Wiley.

Haaland, P. D. (1989) Experimental Design in Biotechnology, New York: Marcel Dekker.

Weisberg, S. (1985) Applied Linear Regression, 2nd edition, New York:Wiley.


SEE ALSO:
fac.aov, plot.boxcox , lambda , loglik .

EXAMPLES:
buffer.fac <- fac.aov(buffer.df)
buffer.bc <- boxcox(buffer.fac, ~pH*thimer + pH*gent)
plot(buffer.fac) # produces both of the plots below
lambda(buffer.bc)
loglik(buffer.bc)
buffer.bc2 <- boxcox(buffer.fac, n.effects=5)
buffer.bc3 <- boxcox(buffer.fac, n.effects = "sig")