I'm trying to fit a model with the written equation:
y = (a + bx + cx^2 + dx^3) / x
I'm aware to do a polynomial I'd do something like:
lm(y ~ poly(x, 4), dat)
But I'm drawing a blank on how to incorporate that divided term. Would I need to pre-calculate 1/x?
Feel free to demo on iris or mtcars or such like, or just write out the sort of "pseudo-code" without data as I have above!
If you are wondering, I am fitting that specific equation to replicate something that's done in my industry, but on my data, so that I can compare the two.