We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi, I am running into an issue for Task 2 part b and c where the line I am fitting to the dependent variable is not functioning properly.
Here is my code, and here is a screenshot of the result. The scatter plot appears fine, but the line isn't working as it did in part a).
This happens in both questions but here is part b):
formula_2 = 'co2_per_capita ~ income' res2 = smf.ols(formula=formula_2, data=world_data_2014).fit()
sns.scatterplot(x='income', y='co2_per_capita', data=world_data_2014) plt.plot(world_data_2014.income,results.fittedvalues)
I looked online, and some sites suggested sorting the data, but I'm curious why this code doesn't work as expected. Thanks!
The text was updated successfully, but these errors were encountered:
Solved it, should have res2 and res3.fittedvalues instead of resultds
Sorry, something went wrong.
No branches or pull requests
Hi,
I am running into an issue for Task 2 part b and c where the line I am fitting to the dependent variable is not functioning properly.
Here is my code, and here is a screenshot of the result. The scatter plot appears fine, but the line isn't working as it did in part a).
This happens in both questions but here is part b):
formula_2 = 'co2_per_capita ~ income'
res2 = smf.ols(formula=formula_2, data=world_data_2014).fit()
sns.scatterplot(x='income', y='co2_per_capita', data=world_data_2014)
plt.plot(world_data_2014.income,results.fittedvalues)
I looked online, and some sites suggested sorting the data, but I'm curious why this code doesn't work as expected. Thanks!
The text was updated successfully, but these errors were encountered: