-
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
Residuals in GLM #540
base: pa/resid
Are you sure you want to change the base?
Residuals in GLM #540
Conversation
This PR seems to be picking up some older commits and needs cleaning up. |
Thanks, Viral. |
* [G]VIF * add reference value source * more tests * glm tests
The PR is now cleaned up and merged with the latest master branch. |
@@ -10,6 +10,7 @@ module GLM | |||
import Base: (\), convert, show, size | |||
import LinearAlgebra: cholesky, cholesky! | |||
import Statistics: cor | |||
using StatsAPI |
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.
it should be in using
part
|
||
function formula(obj::LinPredModel) | ||
function residuals(model::LinPredModel; type=:deviance) |
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 do not know the details of the implementation, but is the residuals
method properly documented (as it is not documented here). I.e. that it supports type
kwarg and what is the behavior depending on the value of the kwarg.
I have added most of the test cases as discussed in #499.
Also, I have changed the residuals function for
lm
. Now the residuals function forlm
is similar to residuals function in 'glm'.Although, I am not sure about applicability of
:working
type residuals inlm
.R
supports:working
type residuals inlm
and which is same as:response
type.