You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ENH: add more premade plot elements like add_lowess #6434
add_lowess is very convenient, just one line to add it to a new plot
e.g. smoothed endog for Logit as a function of predicted probabilities
(usecase calibration or reset plots #6430 or regression plot for models like Logit, GLM )
We also have adding a line in prob plots qqline which includes a regression line, but is written specifically for qq plots (includes also 45 degree line)
Other convenient ones would be fitted polynomials or splines for which we would have some confidence intervals.
lowess smoothing of exog does not seem to observe boundaries, i.e. values can be outside support of data.
using default setting for add_lowess as in previous comment, simulated random sample with nobs=5000
seaborn uses lowess, but we don't have confint for it and bootstrap is slow.
We could add some helper functions for the equivalent of lowess using splines for the plot usecase but with optional confint.
This would be fast with fixed "bandwidth", i.e. df or number of knots, using OLS and a bit slower using RLM. GLMGam would be an option with data driven bandwidth selection, but slower.
aside:
predict should (optionally) use a grid of exog and not just the original data, There was an issue or stackoverflow question that regression plots are not smooth when there are few exog points in some areas.
Activity
josef-pkt commentedon Jan 18, 2020
lowess smoothing of exog does not seem to observe boundaries, i.e. values can be outside support of data.
using default setting for
add_lowessas in previous comment, simulated random sample with nobs=5000josef-pkt commentedon Feb 16, 2020
seaborn uses lowess, but we don't have confint for it and bootstrap is slow.
We could add some helper functions for the equivalent of lowess using splines for the plot usecase but with optional confint.
This would be fast with fixed "bandwidth", i.e. df or number of knots, using OLS and a bit slower using RLM. GLMGam would be an option with data driven bandwidth selection, but slower.
aside:
predict should (optionally) use a grid of exog and not just the original data, There was an issue or stackoverflow question that regression plots are not smooth when there are few exog points in some areas.