Does parametrized Box Cox transform take degrees of freedom away from subsequent models?

The Box-Cox transform has two parameters that equate to a shift $$\alpha$$ and a power $$\lambda$$. Implementations such as scipy.stats.boxcox have the option of either being given $$\lambda$$ or finding an optimal choice of $$\lambda$$ by minimizing the negative log-likelihood of the transformed variables using a normal distribution.

Let says I have two variables $$X$$ and $$Y$$. I would like to perform a regression using function $$f$$ between their Box-Cox transforms $$T(X; \lambda_1)$$ and $$T(Y; \lambda_2)$$ having optimized $$\lambda_1$$ and $$\lambda_2$$ toward the transformed variables being normal.

Whether I train the Box-Cox parameters simultaneously with $$f$$ or perform the Box-Cox optimization and then perform the regression of $$f$$, have I influenced the degrees of freedom of my model?

• Commented Dec 24, 2021 at 6:55
• It depends on what you mean by "degrees of freedom" and how you intend to use this quantity in follow-on calculations. Could you explain?
– whuber
Commented Dec 24, 2021 at 16:50
• @whuber I was hoping that by taking a descriptivist approach rather than a prescriptivist approach that I might learn something new about degrees of freedom through this question. I have a bulding worry that DF are just ad hoc scores. We already have a lot of "what are degrees of freedom?" questions on stats.SE, so I was aiming for something more subtle. Your questions exactly reflect my concern. I guess I achieved writing an obscure question instead of a subtle one. Commented Feb 3, 2022 at 17:53
• The short answer, based on maximum likelihood theory, is that each Box-Cox parameter eats one D.F. For an explicit discussion of this in the context of logistic regression, a classic paper is Royston & Altman, Regression Using Fractional Polynomials of Continuous Covariates... Appl. Stat. (1994) 43 ,No.3, pp.429-467. Find it in pdf form at rss.onlinelibrary.wiley.com/doi/pdf/10.2307/2986270 .
– whuber
Commented Feb 3, 2022 at 18:11