I am poor in statistics. I did a multiple linear regression in python by using statsmodels
. I know that I can transform a non-linear relation into a linear relation in different ways using this model. Combinations of different independent variables are shown in below:
smf.ols(formula = 'y ~ a + I(a**2) + log(b) + c + d', data=data).fit()
where $y$ is a dependent variable depends on second degree polynomial of $a$, log of $b$ and linear in $c$ and $d$.
My question is in such a case what will my equation be?
Best Answer
If I understand your question, you're asking for the model form:
$$y = \alpha + \beta_0a + \beta_1a^2 + \beta_2\log(b) + \beta_3c + \beta_4d + \epsilon$$
where:
data
-1
in the formula).See here for more on how Python formulas work.