Question: Add a quadratic effect (x**2) to the model above. What is the coefficient of x (to within 10%)? I think the answer should be -4.4917.

Add a quadratic effect ("x**2") to the model above. What is the coefficient of x (to within 10%)? I think the answer should be -4.4917. Why is it wrong? What is the correct code for solving this question, thanks a lot! poly_age = MS([poly('x', degree=2)]).fit(df) M = sm.OLS(df['y'], poly_age.transform(df)).fit() print(summarize(M)) coef std err t P>|t| intercept 0.4238 0.032 13.282 0.000 poly(x, degree=2)[0] -4.4917 0.319 -14.077 0.000 poly(x, degree=2)[1] -1.1382 0.319 -3.567 0.001

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!