parameters icon indicating copy to clipboard operation
parameters copied to clipboard

glht objects are not relabeled

Open raffaem opened this issue 5 months ago • 0 comments

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

library(magrittr)
library(glmmTMB)
mydf <- mtcars
mydf %<>% labelled::set_variable_labels(
  mpg = "Miles per gallon",
  cyl = "Number of cylinders",
  gear = "Number of forward gears"
)
fit <- glmmTMB(mpg ~ cyl * gear,
  data = mydf,
  family = gaussian(link = "identity"))
res <- multcomp::glht(fit, linfct = "cyl + gear = 0")
p <- parameters::parameters(res, pretty_names = "labels")
attr(p, "pretty_labels")
#>   cyl + gear == 0 
#> "cyl + gear == 0"

cyl and gear should have been relabelled

raffaem avatar Jul 16 '25 06:07 raffaem