Skip to content

Inconsistency in the use of parenthesis between parameters() and compare_parameters() #1028

@snhansen

Description

@snhansen

Not really a bug, but just an inconsistency I found and thought I'd report. Below it seems that parameters() uses [] for factor levels whereas compare_parameters() uses (). Would be nice if they would use the same.

mod <- lm(mpg ~ factor(cyl), data = mtcars)

parameters::parameters(mod)
#> Parameter   | Coefficient |   SE |          95% CI | t(29) |      p
#> -------------------------------------------------------------------
#> (Intercept) |       26.66 | 0.97 | [ 24.68, 28.65] | 27.44 | < .001
#> cyl [6]     |       -6.92 | 1.56 | [-10.11, -3.73] | -4.44 | < .001
#> cyl [8]     |      -11.56 | 1.30 | [-14.22, -8.91] | -8.90 | < .001
#> 
#> Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed
#>   using a Wald t-distribution approximation.
parameters::compare_parameters(mod)
#> Parameter    |                    mod
#> -------------------------------------
#> (Intercept)  |  26.66 ( 24.68, 28.65)
#> cyl (6)      |  -6.92 (-10.11, -3.73)
#> cyl (8)      | -11.56 (-14.22, -8.91)
#> -------------------------------------
#> Observations |                     32

Metadata

Metadata

Assignees

Labels

Consistency 🍏 🍎Expected output across functions could be more similar

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions