Can we use polynomial regression using logarithmically transformed data. I transformed both y and x1 and x2 variables by natural log. After this, I used polynomial regression to fit. when using poly(), fitting result is good when using other types of model, the results are not good. I wanna make sure if I can use polynomial regression on transformed data?

model form in R is:

mod <- lm(logy ~ poly(logx1 + logx2, 2, raw=TRUE)

Thanks in advance!

  • $\begingroup$ Would you please post a link to the raw, un-transformed data? $\endgroup$ – James Phillips Jun 24 '19 at 12:47

Of course you can use. Not restricted to polynomial regression, depending on your data, you can use any suitable transformation. The question is about if that transformation fits your data well, or not. By using your model, you assume that your DV and IVs have the following relation: $$\log y=a+b\log{x_1}+c\log{x_2}+d\log{x_1}\log{x_2}+e(\log{x_1})^2+f(\log x_2)^2$$ or, in a different form: $$y=Ax_1^bx_2^cx_1^{d\log x_2+e\log{x_1}}x_2^{f\log x_2}$$

  • $\begingroup$ Upvoted for the excellence of the answer. $\endgroup$ – James Phillips Jun 24 '19 at 12:50
  • $\begingroup$ Thank you for your answer! It looks like its explanation is very difficult $\endgroup$ – Sun Rise Jun 24 '19 at 13:30
  • $\begingroup$ I am sorry in this case, what would be these formulas? mod <- lm(logy ~ poly(logx1*logx2, 2, raw=TRUE) $\endgroup$ – Sun Rise Jun 24 '19 at 13:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.