easystats / easystats/parameters

parameters()'s Component grouping is too fuzzy

Open
#1,247 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Consistency :green_apple: :apple:
Dominant language
R
Stars
499
Forks
45
Avg merge
3d 1h
Merged PRs (30d)
3

Description

m_lba <- readRDS(url("https://raw.github.com/DominiqueMakowski/cogmod/main/vignettes/models/m_lba1.rds"))
insight::find_parameters(m_lba)
#> Loading required namespace: rstan
#> $conditional
#> [1] "b_Intercept"      "b_ConditionSpeed"
#> 
#> $ndt
#> [1] "b_ndt_Intercept"      "b_ndt_ConditionSpeed"
#> 
#> $sigma
#> [1] "sigma"
#> 
#> $sigmabias
#> [1] "b_sigmabias_Intercept"      "b_sigmabias_ConditionSpeed"
#> 
#> $boundary
#> [1] "b_boundary_Intercept"      "b_boundary_ConditionSpeed"
insight::find_auxiliary(m_lba)
#> [1] "sigmabias" "boundary"  "ndt"       "sigma"

That model has one parameter type callled sigmabias, and is detected correctly by insight.

parameters::parameters(m_lba) |> 
  as.data.frame()
#>                    Parameter   Component     Median   CI      CI_low
#> 1                b_Intercept conditional  3.1557313 0.95   2.9303093
#> 2           b_ConditionSpeed conditional  0.5545620 0.95   0.2303213
#> 3            b_ndt_Intercept         ndt -1.4402565 0.95  -1.8081333
#> 4       b_ndt_ConditionSpeed         ndt -0.3078568 0.95  -0.6567503
#> 5                      sigma       sigma  1.0000000 0.95   1.0000000
#> 6      b_sigmabias_Intercept       sigma  0.5942473 0.95   0.2209075
#> 7 b_sigmabias_ConditionSpeed       sigma -1.1895320 0.95 -69.2162793
#> 8       b_boundary_Intercept    boundary  0.1223261 0.95  -0.3145768
#> 9  b_boundary_ConditionSpeed    boundary  0.5627345 0.95  -0.1123833
#>        CI_high    pd     Rhat ESS_tail
#> 1  3.419467085 1.000 1.027810      522
#> 2  0.901147971 1.000 1.008764      539
#> 3 -1.278263645 1.000 1.066640      124
#> 4 -0.007389358 0.978 1.177587      400
#> 5  1.000000000 1.000       NA       NA
#> 6  0.814467536 0.994 1.014741      411
#> 7 -0.561339126 1.000 1.686071       13
#> 8  0.762664058 0.681 1.062409      139
#> 9  1.306710988 0.940 1.237117      320

Created on 2026-08-19 with reprex v2.1.1

But parameter lumps it together under Component = sigma, which is wrong, it is a separate component

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 issue with the m_lba example and compare insight::find_parameters() and parameters::parameters() output. Trace how the Component grouping is assigned, then verify that sigmabias is kept separate from sigma and that the displayed components match find_auxiliary().

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.