easystats / easystats/parameters

Variance of random effects is not relabelled

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

Nobody has claimed this yet.

Enhancement :boom:
Dominant language
R
Stars
499
Forks
45
Avg merge
3d 1h
Merged PRs (30d)
3

Description

Bug reported upstream following https://github.com/vincentarelbundock/modelsummary/issues/895.

The variance of random effects is not relabelled:

library(magrittr)
library(glmmTMB)
mydf <- mtcars

mydf %<>% labelled::set_variable_labels(
  mpg = "Miles per gallon",
  gear = "Number of forward gears"
)

fit <- glmmTMB(cyl ~ mpg + (1 + 1 | gear), data = mydf)
p <- parameters::parameters(fit, effects = "all", pretty_names = "labels")
p$Group

attr(p, "pretty_labels")

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

Start by running the R reproducer with magrittr, glmmTMB, labelled, and parameters, then inspect p$Group and attr(p, "pretty_labels"). Trace how parameters() handles glmmTMB random effects and variable labels; done means the random-effects variance is relabelled consistently with the supplied labels.

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
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.