Fix `predict` when the response is a `FunctionTerm`

Open
#571 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
julia
Domain
data

Research direction

Start by running the Julia reproduction using MixedModels.dataset(:cbpp), fit, predict, and fitted. Trace the predict path for a response represented by a FunctionTerm; the issue is done when predict(gm, cbpp; type=:response) ≈ fitted(gm) evaluates successfully.

Written by the indexing model from the issue text.

Description

We want this to work again:

using MixedModels
cbpp = MixedModels.dataset(:cbpp)
gm = fit(MixedModel, @formula((incid/hsz) ~ 1 + period + (1|herd)), cbpp, Binomial(), wts=float(cbpp.hsz))
predict(gm, cbpp; type=:response) ≈ fitted(gm)
Dominant language
Julia
Stars
455
Forks
51
Avg merge
3d 15h
Merged PRs (30d)
4

Getting set up

  • No Dockerfile or Docker Compose file
  • Has a pull request template
  • No contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from JuliaStats/MixedModels.jl

All issues in JuliaStats/MixedModels.jl

Similar issues

More Julia issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.