Reputation: 430
How can i make the line disappear?
rmodel = sm.GLM.from_formula("rBPXSY1 ~ rRIDAGEYR", data=da)
res = rmodel.fit()
res.summary()
pp = sns.lineplot(da.rRIDAGEYR,da.rBPXSY1,alpha=0.4, marker='o', ls='')
add_lowess(pp)
Intended result
**My result **
Upvotes: 0
Views: 113
Reputation: 2803
When using the latest versions of each package, and running
import statsmodels.api as sm
import numpy as np
import seaborn as sns
from statsmodels.graphics.regressionplots import add_lowess
g = np.random.default_rng(0)
x = g.random(size=1000)
y = 5*np.sin(2*np.pi*x) + g.standard_normal(1000)
pp = sns.lineplot(x=x,y=y,alpha=0.4, marker='o', ls='')
pp = add_lowess(pp)
you get an image like the one you desire:
Upvotes: 1