diff --git a/DESCRIPTION b/DESCRIPTION index 7525cb501..c5c11e856 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: parameters Title: Processing of Model Parameters -Version: 0.22.0.5 +Version: 0.22.0.6 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/NEWS.md b/NEWS.md index e278b7e67..d6fb7504a 100644 --- a/NEWS.md +++ b/NEWS.md @@ -12,6 +12,9 @@ * `model_parameters()` for `anova()` from mixed models now also includes the denominator degrees of freedom in the output (`df_error`). +* `print(..., pretty_names = "labels")` for tobit-models from package *AER* now + include value labels, if available. + * Patch release, to ensure that performance runs with older version of datawizard on Mac OS X with R (old-release). diff --git a/tests/testthat/_snaps/print_AER_labels.md b/tests/testthat/_snaps/print_AER_labels.md new file mode 100644 index 000000000..92b571b63 --- /dev/null +++ b/tests/testthat/_snaps/print_AER_labels.md @@ -0,0 +1,19 @@ +# templates + + Code + print(mp, pretty_names = "labels") + Output + # Fixed Effects + + Parameter | Coefficient | SE | 95% CI | z | p + ----------------------------------------------------------------------------------------------- + (Intercept) | 8.72 | 3.45 | [ 1.95, 15.48] | 2.52 | 0.012 + elder's dependency [slightly dependent] | -1.00 | 3.61 | [-8.08, 6.08] | -0.28 | 0.782 + elder's dependency [moderately dependent] | 2.68 | 3.06 | [-3.32, 8.68] | 0.88 | 0.381 + elder's dependency [severely dependent] | 3.88 | 3.00 | [-2.01, 9.77] | 1.29 | 0.197 + carer's level of education | 1.14 | 0.90 | [-0.62, 2.90] | 1.27 | 0.204 + Message + + Uncertainty intervals (equal-tailed) and p-values (two-tailed) computed + using a Wald z-distribution approximation. + diff --git a/tests/testthat/test-print_AER_labels.R b/tests/testthat/test-print_AER_labels.R new file mode 100644 index 000000000..7420cc2b0 --- /dev/null +++ b/tests/testthat/test-print_AER_labels.R @@ -0,0 +1,9 @@ +skip_if_not_installed("AER") +skip_if_not_installed("datawizard") + +test_that("templates", { + data(efc, package = "datawizard") + model <- AER::tobit(neg_c_7 ~ e42dep + c172code, data = efc) + mp <- model_parameters(model) + expect_snapshot(print(mp, pretty_names = "labels")) +})