Skip to content

Commit 96eb264

Browse files
authored
labels for pscl (#1131)
* labels for pscl Fixes #1126 * fix * fix rotten links * update workflow
1 parent 869d2ae commit 96eb264

16 files changed

+64
-15
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ name: R-CMD-check
88

99
jobs:
1010
R-CMD-check:
11-
uses: easystats/workflows/.github/workflows/R-CMD-check.yaml@main
11+
uses: easystats/workflows/.github/workflows/R-CMD-check-no-oldrel.yaml@main

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: parameters
33
Title: Processing of Model Parameters
4-
Version: 0.26.0.14
4+
Version: 0.26.0.15
55
Authors@R:
66
c(person(given = "Daniel",
77
family = "Lüdecke",

NEWS.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535

3636
* `bootstrap_model()` did not work for intercept-only models. This has been fixed.
3737

38+
* Fixed issue with printing labels as pretty names for models from package
39+
*pscl*, i.e. `print(model_parameters(model), pretty_names = "labels")` now
40+
works as expected.
41+
3842
# parameters 0.26.0
3943

4044
## Changes

R/1_model_parameters.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@
358358
#'
359359
#' - Lakens, D., Scheel, A. M., and Isager, P. M. (2018). Equivalence Testing
360360
#' for Psychological Research: A Tutorial. Advances in Methods and Practices
361-
#' in Psychological Science, 1(2), 259–269. \doi{10.1177/2515245918770963}
361+
#' in Psychological Science, 1(2), 259–269.
362362
#'
363363
#' - Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019).
364364
#' Indices of Effect Existence and Significance in the Bayesian Framework.

R/equivalence_test.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ bayestestR::equivalence_test
187187
#'
188188
#' - Lakens, D., Scheel, A. M., and Isager, P. M. (2018). Equivalence Testing
189189
#' for Psychological Research: A Tutorial. Advances in Methods and Practices
190-
#' in Psychological Science, 1(2), 259–269. \doi{10.1177/2515245918770963}
190+
#' in Psychological Science, 1(2), 259–269.
191191
#'
192192
#' - Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019).
193193
#' Indices of Effect Existence and Significance in the Bayesian Framework.

R/format_parameters.R

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,16 @@ format_parameters.parameters_model <- function(model, ...) {
425425
unlist(preds, use.names = FALSE)
426426
))
427427

428+
# for models from pscl, we have "count_" and "zero_" prefixes, which
429+
# we need to add to the "pretty_labels" names, so that we can match
430+
# them with the parameters
431+
if (inherits(model, c("zeroinfl", "hurdle"))) {
432+
pretty_labels <- c(
433+
stats::setNames(pretty_labels, paste0("count_", names(pretty_labels))),
434+
stats::setNames(pretty_labels, paste0("zero_", names(pretty_labels)))
435+
)
436+
}
437+
428438
# retrieve pretty names attribute
429439
pn <- attributes(params)$pretty_names
430440
# replace former pretty names with labels, if we have any labels

R/p_direction.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bayestestR::p_direction
4848
#'
4949
#' - Lakens, D., Scheel, A. M., and Isager, P. M. (2018). Equivalence Testing
5050
#' for Psychological Research: A Tutorial. Advances in Methods and Practices
51-
#' in Psychological Science, 1(2), 259–269. \doi{10.1177/2515245918770963}
51+
#' in Psychological Science, 1(2), 259–269.
5252
#'
5353
#' - Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019).
5454
#' Indices of Effect Existence and Significance in the Bayesian Framework.

R/p_significance.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ bayestestR::p_significance
9999
#'
100100
#' - Lakens, D., Scheel, A. M., and Isager, P. M. (2018). Equivalence Testing
101101
#' for Psychological Research: A Tutorial. Advances in Methods and Practices
102-
#' in Psychological Science, 1(2), 259–269. \doi{10.1177/2515245918770963}
102+
#' in Psychological Science, 1(2), 259–269.
103103
#'
104104
#' - Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., and Lüdecke, D. (2019).
105105
#' Indices of Effect Existence and Significance in the Bayesian Framework.

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,6 @@ Lakens, D. (2024). *Improving Your Statistical Inferences*.
350350
Lakens, D., Scheel, A. M., & Isager, P. M. (2018). Equivalence testing
351351
for psychological research: A tutorial. *Advances in Methods and
352352
Practices in Psychological Science*, *1*(2), 259–269.
353-
<https://doi.org/10.1177/2515245918770963>
354353

355354
</div>
356355

@@ -385,7 +384,7 @@ science. *Journal of Statistical Planning and Inference*, *195*,
385384
Schweder, T., & Hjort, N. L. (2003). Frequentist Analogues of Priors and
386385
Posteriors. In B. Stigum (Ed.), *Econometrics and the Philosophy of
387386
Economics: Theory-Data Confrontations in Economics* (pp. 285–217).
388-
Retrieved from <https://www.duo.uio.no/handle/10852/10425>
387+
Princeton: Princeton University Press.
389388

390389
</div>
391390

man/equivalence_test.lm.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)