-
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
Consistency w.r.t. external weights #124
Comments
The |
Indeed, might be a good application. For reference: JuliaStats/StatsBase.jl#135 |
I expect all of this is very minor but, in addition to having a vector of unit weights take up space there is the issue of unnecessary multiplications by 1. If you have hundreds of thousands of observations and you can do one check of |
@dmbates The idea behind the |
It looks as if my original code was not consistent with respect to external, or prior, weights, saved as
r.wts
in aGlmResp
objectr
. The main reason for allowing weights in a GLM is for a Binomial response in the form of the number of successes and the number of trials. In those cases the response is evaluated as the proportion of successes with the prior weights being the number of trials.In the
wrkwt!
method forGlmResp
there is a check on whetherr.wts
is empty but it never will be. Thefit
method for anAbstractGLM
initializes the weights toones(y)
if they are not specified as an optional argument.I have a slight preference for changing the default prior weights to being a zero-length vector and retaining the checks on whether it is empty or not but that may be making the code overly-complicated to save a very small amount of time and storage. Should we always have prior weights, even if they are unit weights?
The text was updated successfully, but these errors were encountered: