0

Can I compare say two models where one have predictor P and the other have log(P) all else being equal?

I have found posts on the topic but I can only decipher from those that you cannot transform the response variable without adjustment, see here. But what about the predictors?

Andreas
  • 5
  • 3

1 Answers1

1

Yes, you can compare these two models using AIC. I presume you're asking because the models are not nested. AIC is a technique to estimate the minimum KL divergence between each candidate model from a set of candidate models and the true data-generating distribution, and it is not required that the set of candidate models be 'nested' within each other. See e.g. page 266-267 of Burnham and Anderson.

That said, you could use a Taylor expansion on $\log(P)$ to argue that they are approximately nested. Suppose that you're fitting linear models. Then the right-hand sides of your two models look like

\begin{aligned} \alpha_0 + \alpha_1P \end{aligned} and\begin{aligned} \beta_0 + \beta_1\log(P) &\approx \beta_0 + \beta_1(P-1) - \beta_1(1/2)(P-1)^2 + \beta_1(1/3)(P-1)^3 - \beta_1(1/4)(P-1)^4 \\ &= \beta_0^* + \beta_1^*P + \beta_2^*P^2+ \beta_3^*P^3+ \beta_4^*P^4 \end{aligned}

Thus, you're basically choosing between a simple linear regression or a polynomial linear regression, but with the very restrictive assumption that all of the coefficients share a particular 1-1 correspondence.

psboonstra
  • 1,745
  • 7
  • 12
  • Thanks for your reply! I started experimenting to see if I could illustrate this in R. This is what I came up with, but I was expecting the fitted lines to be more similar. What am I doing wrong? – Andreas Jul 05 '20 at 21:47
  • That's pretty awful. How do I do line-breaks? – Andreas Jul 05 '20 at 21:54
  • Re: the dissimilarity between the two plots you created. Your code fits an unstructured polynomial model, where each coefficient is allowed to be estimated independently, but the relationship will only hold when one constrains all of the coefficients to have the fixed relationship specified by the Taylor expansion. I *think* one would need to write a custom likelihood function to be optimized. – psboonstra Jul 08 '20 at 12:52
  • Re: linebreaks. See [here](https://meta.stackoverflow.com/editing-help). It looks like you can use `
    `
    – psboonstra Jul 08 '20 at 13:02
  • Ok, thank you! I'm not a mathematician so I'm fumbling in the dark here but I changed the code [here](https://stats.stackexchange.com/questions/476011/the-log-of-a-predictor-and-polynomial-regression), am I on the right track? – Andreas Jul 09 '20 at 17:35