Skip to content
New issue

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

ENH: Add standard errors to Geom.smooth? #1238

Closed
nickeubank opened this issue Jan 5, 2019 · 4 comments
Closed

ENH: Add standard errors to Geom.smooth? #1238

nickeubank opened this issue Jan 5, 2019 · 4 comments

Comments

@nickeubank
Copy link

How hard would it be to add standard errors (the se keyword) to Geom.smooth? Linear and loess fits are something I use a lot, but they're not super useful for inference without confidence intervals.

@Mattriks
Copy link
Member

Mattriks commented Jan 5, 2019

Confidence intervals were added 5 days ago for Stat.smooth(method=:lm) (see #1231). You can use it now by doing add Gadfly#master. For Loess intervals, work needs to be done in Loess.jl first.

@nickeubank
Copy link
Author

Oh, great! Thanks @Mattriks

One API question: I'm not sure how closely this packing is hoping to hew to ggplot2, but this doesn't seem to implement the se keyword (I guess it's implied by levels). That deliberate? Works for me either way, just wanted to flag.

@Mattriks
Copy link
Member

Mattriks commented Jan 5, 2019

This is a good example of where Gadfly and ggplot2 differ.
Gadfly uses constructions such as this:

 layer(Stat.smooth(method=:lm, levels=[0.95, 0.99]), Geom.line, Geom.ribbon))

which says that in that layer both Geom.line and Geom.ribbon should use the output from Stat.smooth. Note that Geom.smooth = Geom.line + Stat.smooth, so you can use Geom.smooth if you want the line and no ribbon.

@nickeubank
Copy link
Author

oh great, that's very helpful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants