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

roadmap to 1.0 release

Open kleinschmidt opened this issue 2 years ago • 8 comments

Current plan is that we'll tag 0.7 ASAP (today probably) and then we commit to tagging 1.0 in one month (so Feb 24). #183 is sufficiently breaking taht we want to make sure that dependencies have time to upgrade and shake out any sneaky bugs that may require further breakage before we commit to 1.0.

For 0.7:

  • [x] #183
  • [x] #276

For 1.0: (with possible 0.8 if we want to give dependencies a release to target for upgrades)

  • [ ] remove table regression model
  • [ ] maybe #247
  • [x] #175 #273

kleinschmidt avatar Jan 24 '23 16:01 kleinschmidt

Packages we need to check (feel free to edit/add to)

  • [ ] MixedModels.jl https://github.com/JuliaStats/MixedModels.jl/pull/664
  • [ ] Effects.jl
  • [x] GLM.jl https://github.com/JuliaStats/GLM.jl/pull/512
  • [ ] RegressionFormulae.jl
  • [ ] FixedEffectsModels.jl

palday avatar Jan 25 '23 16:01 palday

Hi! Can you kindly clarify - can #154 be included in 1.0 release plan? I suppose apply_context stage can close some other issues as #268 ...

PharmCat avatar Jan 26 '23 11:01 PharmCat

Here one PR I make for GLM.jl : https://github.com/JuliaStats/GLM.jl/pull/508 for Testing of Between-Subjects Effects, there one problem: it relies very heavily on the internal structures of the types from StatsModels. But I didn't found in StatsModels appropriate functions with methods to access these quantities in a stable way for this code:

"""
    lcontrast(obj, i::Int)

L-contrast matrix for `i` fixed effect.
"""
function lcontrast(obj, i::Int)
    n = length(obj.mf.f.rhs.terms)
    if i > n || n < 1 error("Factor number out of range 1-$(n)") end
    p    = size(obj.mm.m, 2) # number of coefs
    inds = findall(x -> x==i, obj.mm.assign)
    if typeof(obj.mf.f.rhs.terms[i]) <: CategoricalTerm
        mxc   = zeros(size(obj.mf.f.rhs.terms[i].contrasts.matrix, 1), p)
        mxcv  = view(mxc, :, inds)
        mxcv .= obj.mf.f.rhs.terms[i].contrasts.matrix
        mx    = zeros(size(obj.mf.f.rhs.terms[i].contrasts.matrix, 1) - 1, p)
        for i = 2:size(obj.mf.f.rhs.terms[i].contrasts.matrix, 1) # correct for zero-intercept model
            mx[i-1, :] .= mxc[i, :] - mxc[1, :]
        end
    else
        mx = zeros(length(inds), p) # unknown correctness for zero-intercept model
        for j = 1:length(inds)
            mx[j, inds[j]] = 1
        end
    end
    mx
end

tname(t::AbstractTerm) = "$(t.sym)"
tname(t::InteractionTerm) = join(tname.(t.terms), " & ")
tname(t::InterceptTerm) = "(Intercept)"

PharmCat avatar Jan 26 '23 12:01 PharmCat

Hi! Can you kindly clarify - can #154 be included in 1.0 release plan? I suppose apply_context stage can close some other issues as #268 ...

nope, not on the roadmap. the goal here is to get 1.0 released with essentially what is one master right now and with whatever other simple but breaking changes we've had planned/ready for a while.

#154 is much more speculative and I'm not really convinced it's a good idea still (I think the problem is real, but not sure that that's the solution 😁)

kleinschmidt avatar Jan 26 '23 15:01 kleinschmidt

Great to see this update! FixedEffectModels.jl has a PR for v0.7

matthieugomez avatar Jan 31 '23 16:01 matthieugomez

Current plan is that we'll tag 0.7 ASAP (today probably)...

For 0.7:

* [x]  [FunctionTerm is dead, long live FunctionTerm #183](https://github.com/JuliaStats/StatsModels.jl/pull/183)

* [ ]  [Export hasintercept and omitsintercept? #276](https://github.com/JuliaStats/StatsModels.jl/issues/276)

Hi! Is any problem to tag 0.7 now?

PharmCat avatar Mar 09 '23 23:03 PharmCat

0.7 registration PR opened 🎉 https://github.com/JuliaRegistries/General/pull/79527

kleinschmidt avatar Mar 14 '23 00:03 kleinschmidt

...and merged.

kleinschmidt avatar Mar 14 '23 17:03 kleinschmidt