# Does Box-Cox parameter estimation count towards parameters for AIC?

Suppose I have a regression model with e.g. 2 parameters

$y = ax + b$

But the data are non-normal so before regressing I transform both sides with Box-Cox estimation. Thus I get two Box-Cox parameters as well, $\lambda_x$ and $\lambda_y$.

Now I want to calculate AIC for this model. How many parameters are there?

My instinct would be that $\lambda_y$ counts as a parameter but not $\lambda_x$, because if the model is applied to forecasting $y$ from $x$, $\lambda_x$ can be estimated any time from the available $x$ but we have to remember which $\lambda_y$ to use as we don't know the $y$ we are trying to predict.

-
I don't think that you need to deal with λx at all as the optimal λy is conditional upon X and any ARIMA structure that might be necessary to render the error process Gaussian. The reason for this is that if you had a Z in addition to X you would have to independently asses a λz etc.. –  IrishStat Jun 16 '14 at 14:21
What do you mean optimal $\lambda_y$ - optimal for making $y$ normal or optimal for making predictions with the regression model? –  Sideshow Bob Jun 16 '14 at 14:29
The Box-Cox test to determine the optimal Y transform can be performed with and without regress/arima structure. Thus the optimal transform can be influenced by the causative/predictive structure that may be in effect. The optimal transform constructed independently of the X's is of little or no concern as the whole idea is to generate a set of residuals from a useful model using any prespecified X's and/or any empirically identified ARIMA structure and/or any deterministic structure found via Intervention Detection. –  IrishStat Jun 16 '14 at 15:00
In General my comments are correct . In specific if there is not a time/spatial context it is irrelevant as you point out.The OP did not specify that there was a time/spatial issue but he did not say there was none. So on the off chance that there was I wanted to make clear to him and all other readers of the list this was so. –  IrishStat Jun 16 '14 at 16:45

Write $p_\lambda(x)$ for the Box-Cox transformation of $x$ with parameter $\lambda$, $-\infty\lt\lambda\lt\infty$. The full model for data $(x_i,y_i)$ where the responses $(y_i)$ are viewed as a realization of a random vector $(Y_i)$ is described in the question as

$$\mathbb{E}(p_{\lambda_y}(Y_i)) = a + b\, p_{\lambda_x}(x_i).$$

That explicitly has four parameters ${a, b, p_{\lambda_y}, p_{\lambda_x}}$, all of which are identifiable provided there are at least three distinct values of $x_i$ and three distinct values of $y_i$. According to the answers to your preceding question, you count four parameters when none of the values are established independently of the data (and therefore are estimated from the data). If instead either (or both) $\lambda_x$ or $\lambda_y$ were established in some other way--for instance, if $\lambda_y$ were computed from a separate data set--then it would not be counted.

(Depending on distributional assumptions made about $p_{\lambda_y}(Y_i)$, there could be more parameters involved in fitting the model. Counting them is not affected by the Box-Cox transformations. The one-to-one property of the Box-Cox transformation indicates that any parameter that is identifiable in the absence of the transformation will remain identifiable when the transformation is applied.)

-
Say the model will be applied in future to many $x$ at once. Then could I call the model $$\mathbb{E}(p_{\lambda_y}(Y_i)) = a + b\, P'(x_i).$$ where $P'()$ means "estimate and then use a Box Cox transform from the newly available $x$s". Does that mean the model has three parameters as I don't need ot record $\lambda_x$? –  Sideshow Bob Jun 18 '14 at 11:29
Perhaps, but you might be losing a lot in that description. If you treat $a$ and $b$ as "known" in the future modeling, you will fail to account for their uncertainties due to estimation. Assuming you account for that correctly, your new models have two parameters: namely, the two Box-Cox parameters that will be estimated. –  whuber Jun 18 '14 at 13:39

Why are you transforming the data?

What scale are you asking your questions on? If it isn't the transformed scale, then there is the issue of parameterization.

An example might help. Suppose some response $Y \sim \log N(\mu, \sigma)$, and you want to compare $Y$ across two independent populations. Suppose further that the question of interest is, "Are the means equal in these populations?" The obvious thing to do in this case is to analyze $\log y_{ij}$ and estimate $\mu_1 - \mu_2$.

That would not answer the question, though. $E\{Y_i\} = \exp (\mu_i+\sigma_i)$. What you need is a confidence interval on $\mu_1-\mu_2 + \sigma_1-\sigma_2$.

Now, if in fact you are interested in things on the transformed scale none of this applies. It happens: chemists and environmental scientists are interested in pH (to the point that they measure pH rather than $H^+$ concentrations.)

-
What scale should I be asking my questions on? I suppose if I'm using AIC to pick the best regression model it doesn't matter whether I count Box-Cox parameters anyway, as they will just add the same constant the AIC of each model. –  Sideshow Bob Jun 16 '14 at 16:37
It does not look like a confidence interval for this linear combination of the four parameters would address any meaningful question. Could you elaborate on why you have proposed it? Regardless of the scale at which the question is asked or interpreted, if one uses additional parameters in the fitting process, then they must be counted appropriately. Ignoring them would be a mistake. –  whuber Jun 16 '14 at 16:59
Beg to differ. If the question is on the original scale, the mean of the log-normal is $exp \mu+\sigma$. –  Dennis Jun 16 '14 at 18:41
Ignore the above comment please. What I intended to write is: This is an example that may or may not apply to the OPs question. We don't have any context to know. My point is that if $f$ is a nonlinear function and $Y$ a nondegenerate RV, $f(E\{Y\}) \neq E\{f(Y)\}$. –  Dennis Jun 16 '14 at 18:51
@ Bob. Without knowing the problem context I can't tell what scale you should be using. This is a caution anyone using Box-Cox transforms needs to consider. –  Dennis Jun 16 '14 at 18:55