Question
Hi, I need help for the below question: First, I had found out the unusual data points, I even got the correct answer. Let me
Hi, I need help for the below question:
First, I had found out the unusual data points, I even got the correct answer. Let me show you here first.
Next, is the question that I need help, I try to drop the troublesome data points as per the question request, I even reached the R-squared more than 0.95 as per the question request, but I couldn't reach the p-value=0.05. So I got wrong from my results. The question and my answer is below:
2g. Final model [5 pts]
Develop your final model by dropping one or more of the troublesome data points indicated in the leverage vs residual plot and insuring any interactions in your model are still significant at =0.05p=0.05. Your model should have an 2R2 great than 0.95. Call your model model_final.
My code:
X = votes.drop([5,42,49,51])[['Gore','Nader','Buchanan']] Y = votes.drop([5,42,49,51])['Bush'] # develop your model_final here model_final = sm.OLS(Y, X).fit() # your code here model_final.summary()
Please help me and guide me through on the above question. Thank you so much.
\# uncomment and fill unusual with list of indices for high-leverage and/or high-residual points \# unusual = [] \# your code here unusual = [42,49,51] \# your code here results = smf.ols('Bush Nader + Gore + Buchanan', data=votes).fit() sm.graphics.plot_leverage_resid2(results) plt.show() Out [95] : OLS Regression Results
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started