easystats / easystats/easystats

check_predictions() does not work objects of class `_multinom`, created with tidymodels

Open
#452 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3 investigators :grey_question::question:
Dominant language
R
Stars
1.2k
Forks
88
PR merge metrics
No merged PRs in 30d

Description

library(tidyverse)
library(tidymodels)
#> Registered S3 method overwritten by 'future':
#>   method               from      
#>   all.equal.connection parallelly
library(easystats)
#> # Attaching packages: easystats 0.7.4 (red = needs update)
#> ✖ bayestestR  0.15.3   ✔ correlation 0.8.7 
#> ✖ datawizard  1.0.2    ✖ effectsize  1.0.0 
#> ✖ insight     1.2.0    ✖ modelbased  0.11.0
#> ✖ performance 0.13.0   ✖ parameters  0.25.0
#> ✔ report      0.6.1    ✔ see         0.11.0
#> 
#> Restart the R-Session and update packages with `easystats::easystats_update()`.

fit_obj <- multinom_reg() |>
  fit(species ~ bill_length_mm, data = penguins)

check_predictions(fit_obj)
#> Error: Could not simulate responses. Maybe there is no `simulate()` for objects
#>   of class `_multinom`?

check_predictions(extract_fit_engine(fit_obj))
#> Error: Could not simulate responses. Maybe there is no `simulate()` for objects
#>   of class `multinom`?

Created on 2025-06-23 with reprex v2.1.1

Contributor guide

Open the 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.

Research direction

Reproduce the failure with the supplied tidymodels example, then trace check_predictions() for the _multinom and multinom objects returned by multinom_reg() and extract_fit_engine(). Confirm the expected simulation path for these model classes and verify that check_predictions() completes without the reported error.

Written by the indexing model from the issue text.

Assessment

Tech stack
r
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.