-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
Consistency 🍏 🍎Expected output across functions could be more similarExpected output across functions could be more similar
Description
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 | 32Metadata
Metadata
Assignees
Labels
Consistency 🍏 🍎Expected output across functions could be more similarExpected output across functions could be more similar