GLM.jl icon indicating copy to clipboard operation
GLM.jl copied to clipboard

Change `wts` keyword argument name to `weights`

Open pdeffebach opened this issue 6 years ago • 4 comments

As mentioned in #341 , wts is a bit esoteric and unclear. Better to use weights as the name of the keyword argument for weights.

Let me know your thoughts on changing the name of keyword argument or if I should change the name of the field in GlmResp, LmResp etc. as well.

pdeffebach avatar Dec 31 '19 20:12 pdeffebach

Probably better also rename the field, though that's secondary.

nalimilan avatar Jan 01 '20 18:01 nalimilan

Actually, weights should go in the formula call.

I'm about to spend a lot of time re-writing R-code because the observations that have NA are different than the weights that have NA and I want all of them. One way to handle this is to have StatsModels take care of it when creating the model matrix.

pdeffebach avatar Jul 01 '20 18:07 pdeffebach

It's been discussed a few times before (https://github.com/JuliaStats/StatsModels.jl/issues/21). One alternative possibility would be to pass a symbol or string to the weights argument, and have a way to pass this to StatsModels when constructing the model matrix. We should settle this in StatsModels.

nalimilan avatar Jul 03 '20 07:07 nalimilan

One alternative possibility would be to pass a symbol or string to the weights argument

That's what FixedEffectModels.jl does

jariji avatar Aug 29 '22 04:08 jariji