Estimates the power λ in a Box-Cox transformation, that maximizes the partial log-likelihood in ANOVA
(W. van den Berg).
Options
PRINT = string tokens |
Controls printed output (aovtable , lambda , monitoring ); default aovt , lamb |
---|---|
TREATMENTSTRUCTURE = formula |
Defines the treatment model; if this is not set, the default is taken from any existing setting defined by the TREATMENTSTRUCTURE directive |
BLOCKSTRUCTURE = formula |
Defines any block model; if this is not set, the default is taken from any existing setting defined by the BLOCKSTRUCTURE directive |
COVARIATE = variates |
Specifies any covariates; if this is not set, the default is taken from any existing setting defined by the COVARIATE directive |
FACTORIAL = scalar |
Limit in the number of factors in the terms generated from the TREATMENTSTRUCTURE formula; default 3 |
CONTRASTS = scalar |
Limit on the order of a contrast of a treatment term; default 4 |
DEVIATIONS = scalar |
Limit on the number of factors in a treatment term for the deviations from its fitted contrasts to be retained in the model; default 9 |
PLOT = string token |
Whether to plot the partial log-likelihood (partialloglikelihood ); default part |
CIPROBABILITY = scalar |
Probability level for the confidence interval for lambda; default 0.95, i.e. a 95% confidence interval |
TRIALVALUES = variate |
Values of λ for which the partial log-likelihood is to be calculated; default !(-4, -3.75 ... 4) |
TRANSFORM = string token |
How to transform the y-variate (estimate , trialvalue ); default tria |
STEPLENGTH = scalar |
Steplength for estimating λ; default 0.01 |
MAXCYCLE = scalar |
Maximum number of iterations; default 100 |
TOLERANCE = scalar |
Tolerance for convergence; default 0.00001 |
ASAVE = identifier |
Saves the ANOVA save structure from the analysis of variance |
Parameters
Y = variates |
Response variate |
---|---|
NEWY = variates |
Saves the transformed response variate |
LAMBDA = scalars |
Saves the estimated value of λ |
LOWER = scalars |
Saves the lower confidence limit for λ |
UPPER = scalars |
Saves the upper confidence limit for λ |
Description
ABOXCOX
uses profile likelihood to estimate the parameter λ for a Box-Cox transformation (Box & Cox 1964) in a an ANOVA
analysis. The transformation is defined as
yλ = (yλ – 1) / λ λ ≠ 0
yλ = loge(y) λ = 0
The TRIALVALUES
option supplies trial values of λ (in a variate) at which the partial log-likelihood is evaluated. If the maximum value is within the range of the supplied values, ABOXCOX
then finds the value of λ that maximizes the partial log-likelihood, using a Newton-Raphson algorithm. It also estimates confidence limits for λ. The probability for the interval is specified by the option CIPROBABILITY
; default 0.95 (i.e. 95%). Note: if the confidence region includes the value one, there is no evidence (at the specified probability level) to support taking a transformation.
The response variate is supplied by the Y
parameter, and must contain only positive values. The transformed variate can be saved by the NEWY
parameter. The TRANSFORM
option controls whether the transformation uses the estimated value of λ or the best of the trial values (default). Using the trial value will usually provide results that are easier to interpret. For example, if the estimated value is close to zero, it may be clearer to use a logarithmic transformation than the power transformation. The estimated value of λ can be saved by the LAMBDA
parameter, and its confidence limits can be saved by the LOWER
and UPPER
parameters.
The treatment model can be specified using the TREATMENTSTRUCTURE
option, the block structure (if any) on the subjects can be specified by the BLOCKSTRUCTURE
option, and the COVARIATE
option can be used to list any covariates. If any of these options is unset, the default is taken from any existing setting defined by the directives TREATMENTSTRUCTURE
, BLOCKSTRUCTURE
or COVARIATE
, respectively. The FACTORIAL
option can be used to set a limit on the number of factors in the terms generated from the TREATMENTSTRUCTURE
option.
Contrasts can be specified by using the functions POL
, REG
, COMPARISON
, POLND
or REGND
in the TREATMENTSTRUCTURE
formula, as in ANOVA
. The CONTRASTS
option places a limit on the order of contrasts that are fitted. The DEVIATIONS
option sets a limit on the number of factors in the terms whose deviations from the fitted contrasts are to be retained in the model. See ANOVA
for more details.
Printed output is controlled by the PRINT
option, with settings:
aovtable |
prints the analysis-of-variance table of the transformed variate; |
---|---|
lambda |
prints the estimated value of λ, and its confidence limits; and |
monitoring |
reports the progress of the estimation. |
The default is to print the analysis-of-variance table and the estimate of λ with its confidence limits.
The ASAVE
option can be used to save the ANOVA
save structure from the analysis of the transformed variate. This can then be used to produce further output, by the usual commands ADISPLAY
, APLOT
and so on.
By default, a plot of the partial log-likelihood is produced. This can be suppressed by setting option PLOT=*
.
The STEPLENGTH
option specifies the steplength for the estimation process (default 0.00001), the MAXCYCLE
option specifies the maximum number of iterations (default 100), and the TOLERANCE
option specifies the tolerance for convergence (default 0.00001).
Options: PRINT
, TREATMENTSTRUCTURE
, BLOCKSTRUCTURE
, COVARIATE
, FACTORIAL
, CONTRASTS
, DEVIATIONS
, PLOT
, CIPROBABILITY
, TRIALVALUES
, STEPLENGTH
, MAXCYCLE
, TOLERANCE
, ASAVE
.
Parameters: Y
, NEWY
, LAMBDA
, LOWER
, UPPER
.
Method
The partial log-likelihood for λ can be found on pages 178-180 of Pawitan (2001). The confidence limits are estimated by cubic interpolation, using the INTERPOLATE
directive. This is feasible only if at least two values have been evaluated on either side of the maximum. The TRIALVALUES
option can be used to include additional values if this fails.
Action with RESTRICT
The y-variate may be restricted.
References
Box, G.E.P. & Cox, D.R. (1964). An analysis of transformations. Journal of the Royal Statistical Society Series B, 26, 211–252.
Pawitan, Y. (2001). In All Likelihood: Statistical Modelling And Inference Using Likelihood. Oxford: Clarendon Press.
See also
Directive: ANOVA
.
Procedure: YTRANSFORM
.
Commands for: Analysis of variance.
Example
CAPTION 'ABOXCOX example'; STYLE=meta " Data from Box, G.E.P. & Cox, D.R. (1964). An analysis of transformations. Journal of the Royal Statistical Society Series B, 26, 211-252." FACTOR [LEVELS=3; VALUES=16(1...3)] Poison & [LEVELS=4; VALUES=(1...4)12] Treatment VARIATE [NVALUES=48] Time READ Time 0.31 0.82 0.43 0.45 0.45 1.10 0.45 0.71 0.46 0.88 0.63 0.66 0.43 0.72 0.76 0.62 0.36 0.92 0.44 0.56 0.29 0.61 0.35 1.02 0.40 0.49 0.31 0.71 0.23 1.24 0.40 0.38 0.22 0.30 0.23 0.30 0.21 0.37 0.25 0.36 0.18 0.38 0.24 0.31 0.23 0.29 0.22 0.33 : TREATMENTS Poison * Treatment ABOXCOX Time; NEWY=TimeTran " TimeTran is transformation of Time using trial value closest to optimum." ANOVA TimeTran