Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Macros for the Design and Analysis of Experiments

ADXTRANS: Determine an Optimal Box-Cox Power Transformation

%adxtrans(dsin, dsout, resp, model, intvllo, intvlhi, numintvl)

where

dsinnames the SAS data set that contains the coded design and the original, untransformed values of the response variable.
dsoutnames the output SAS data set to contain the coded design and the transformed values of the response. The value for dsout can be the same as dsin. In this case the original values of the response variable are replaced by the transformed values.
respnames the response variable for analysis. The Box-Cox family of transformations requires all values of resp to be positive. If resp has zero or negative values but you still want to estimate an optimal transformation, add an amount c to each response, where c is greater than the absolute value of the most negative value of resp.
modellists the independent variables for analysis.
intvllois the bottom end of the range for computing the likelihood. The default value is -2.
intvlhiis the top end of the range for computing the likelihood. The default value is 2.
numintvlis the number of intervals tested in the range for computing the likelihood. The default value is 21.

The ADXTRANS macro uses maximum likelihood theory to estimate an optimal transformation within the class of power transformations of the form

z=y^\lambda
When \lambda =0, a limit argument justifies using the transformation z = log(y). (Refer to Box and Cox, 1964.) The algorithm computes the likelihood of the data for several values of \lambda in the test range and takes the value for which the likelihood is maximized as the estimated optimal transform. By default, the test range is \lambda =-2,-1.8,-1.6,
 ... ,1.8, 2.

The ADXTRANS macro is useful in situations where the original form of the measurements for the response variable is not the best one to use when analyzing the data. For example, in many situations the original data are not normally distributed, but after applying a log transformation, the transformed data are normally distributed.

Suppose the RESULT data set contains factors T1, T2, and T3 along with values for a response variable BURST. To estimate an optimal Box-Cox power transformation using the defaults for the number of intervals and the ends of the range, use the following statements:

   %adxgen
   %adxtrans(result,tresult,burst,T1 T2 T3)
The design with the transformed values for the response is stored in the TRESULT data set.

Output from ADXTRANS

The ADXTRANS macro produces an output listing as well as the ADXREG output data set. The ADXREG data set contains the following variables for each value of \lambda in the test range:

ADXCONFa character variable of length 1. The value of ADXCONF is an asterisk (*) if the associated value of \lambda is within a 95% confidence interval of the estimated optimum. Otherwise, the value of ADXCONF is a blank.
ADXLAMthe value of \lambda.
ADXLIKEthe log-likelihood based on the fit of the model to the transformed response.
_RMSE_the root mean squared error based on the fit of the model to the transformed response.
effectt-values for estimates of parameters for effects in the model. The names for effect depend on the model. If the parameters in the model are T1 and T2, the ADXREG data set contains new variables T1 and T2, whose values are the t-values for the parameter estimates. The variable that contains t-values for the intercept parameter is named INTERCEP.

The ADXTRANS macro lists

The data require a transformation if the confidence interval does not contain \lambda=1. A plot of _RMSE_ against \lambda should dip fairly steeply with a minimum in the region of the optimum value. Typically, many of the parameter estimates might appear to be significant outside the region of the optimum \lambda, but near it only a few will be highly significant and the rest will be insignificant.

Chapter Contents
Chapter Contents
Previous
Previous
Next
Next
Top
Top

Copyright © 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.