-
Notifications
You must be signed in to change notification settings - Fork 114
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
Add residuals convenience function to docs #445
Conversation
This is my first real PR to a Julia package repo, so please forgive me if I've made any mistakes in setting this up. |
docs/src/index.md
Outdated
@@ -146,6 146,7 @@ F-test: 2 models fitted on 50 observations | |||
Many of the methods provided by this package have names similar to those in [R](http://www.r-project.org). | |||
- `coef`: extract the estimates of the coefficients in the model | |||
- `deviance`: measure of the model fit, weighted residual sum of squares for lm's | |||
- `residuals`: returns the vector of residuals. This yields the same vector as `@. sign(y - predict(model)) * sqrt(devresid(d, y, predict(model)))`, where `d` is the distribution object that was used with the original `lm` call. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd just use a short description for consistency with other functions in the list:
- `residuals`: returns the vector of residuals. This yields the same vector as `@. sign(y - predict(model)) * sqrt(devresid(d, y, predict(model)))`, where `d` is the distribution object that was used with the original `lm` call. | |
- `residuals`: return the vector of residuals |
Also probably better put it after predict
, since these are quire similar.
If you feel like adding more information, it could go to a docstring instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've taken on board your suggestion for the residuals
stuff under the Many of the methods
heading. I've also moved the note about how residuals
returns the same thing as the longer code block involving devresid
to the docstring for devresid
(since that's probably where the question will come up for folks), though feel free to disregard that if you don't think it'll be useful.
Sorry about taking so long to get to this; I got busy with school. Let me know if there's anything else you would like me to add or fix. |
Something seems to have gone wrong when rebasing: many unrelated changes appear in the diff, and there are conflicts. |
Sorry about that; I'll fix it by tomorrow night. |
d755f7b
to
64ec692
Compare
OK this should be fixed / be what we want now |
Codecov Report
@@ Coverage Diff @@
## master #445 /- ##
=======================================
Coverage 84.01% 84.01%
=======================================
Files 7 7
Lines 807 807
=======================================
Hits 678 678
Misses 129 129 Continue to review full report at Codecov.
|
Thanks! |
Preliminary attempt at adding discussion of
residuals
convenience function to docs, since it's in the code (and obviously in StatsBase), but not, as far as I can tell, mentioned otherwise anywhere in any of the docs.