Skip to content

Commit fb746e3

Browse files
authored
Prepare CRAN submission (#691)
* Prepare CRAN submission * fix vignette? * styler * fix * docs
1 parent 55f598a commit fb746e3

47 files changed

Lines changed: 51 additions & 191 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DESCRIPTION

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: bayestestR
33
Title: Understand and Describe Bayesian Models and Posterior Distributions
4-
Version: 0.15.0.4
4+
Version: 0.15.1
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",
@@ -67,7 +67,7 @@ Depends:
6767
R (>= 3.6)
6868
Imports:
6969
insight (>= 1.0.0),
70-
datawizard (>= 0.13.0),
70+
datawizard (>= 1.0.0),
7171
graphics,
7272
methods,
7373
stats,
@@ -95,7 +95,7 @@ Suggests:
9595
lavaan,
9696
lme4,
9797
logspline (>= 2.1.21),
98-
marginaleffects (>= 0.24.0.6),
98+
marginaleffects (>= 0.24.0),
9999
MASS,
100100
mclust,
101101
mediation,
@@ -128,4 +128,3 @@ Config/testthat/parallel: true
128128
Config/rcmdcheck/ignore-inconsequential-notes: true
129129
Config/Needs/website: easystats/easystatstemplate
130130
Config/Needs/check: stan-dev/cmdstanr
131-
Remotes: easystats/datawizard, vincentarelbundock/marginaleffects

NEWS.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1-
# bayestestR 0.15.0.4
1+
# bayestestR 0.15.1
2+
3+
## Changes
4+
5+
* Several minor changes to deal with recent changes in other packages.
26

37
## Bug fixes
48

59
* Fix to `emmeans` / `marginaleffects` / `data.frame(<rvar>)` methods when using multiple credible levels (#688).
610

7-
811
# bayestestR 0.15.0
912

1013
## Changes

R/bayesfactor_parameters.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ bayesfactor_parameters.stanreg <- function(posterior,
323323
}
324324

325325

326-
327326
#' @rdname bayesfactor_parameters
328327
#' @export
329328
bayesfactor_parameters.brmsfit <- bayesfactor_parameters.stanreg

R/bci.R

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ bci <- function(x, ...) {
2727
bcai <- bci
2828

2929

30-
3130
#' @rdname bci
3231
#' @export
3332
bci.numeric <- function(x, ci = 0.95, verbose = TRUE, ...) {
@@ -40,7 +39,6 @@ bci.numeric <- function(x, ci = 0.95, verbose = TRUE, ...) {
4039
}
4140

4241

43-
4442
#' @rdname bci
4543
#' @inheritParams p_direction
4644
#' @export
@@ -66,7 +64,6 @@ bci.data.frame <- function(x, ci = 0.95, rvar_col = NULL, verbose = TRUE, ...) {
6664
}
6765

6866

69-
7067
#' @export
7168
bci.draws <- function(x, ci = 0.95, verbose = TRUE, ...) {
7269
dat <- .compute_interval_dataframe(x = .posterior_draws_to_df(x), ci = ci, verbose = verbose, fun = "bci")
@@ -89,7 +86,6 @@ bci.MCMCglmm <- function(x, ci = 0.95, verbose = TRUE, ...) {
8986
}
9087

9188

92-
9389
#' @export
9490
bci.mcmc <- function(x, ci = 0.95, verbose = TRUE, ...) {
9591
d <- as.data.frame(x)
@@ -99,7 +95,6 @@ bci.mcmc <- function(x, ci = 0.95, verbose = TRUE, ...) {
9995
}
10096

10197

102-
10398
#' @export
10499
bci.bamlss <- function(x,
105100
ci = 0.95,
@@ -114,7 +109,6 @@ bci.bamlss <- function(x,
114109
}
115110

116111

117-
118112
#' @export
119113
bci.bcplm <- function(x, ci = 0.95, verbose = TRUE, ...) {
120114
d <- insight::get_parameters(x)
@@ -137,7 +131,6 @@ bci.mcmc.list <- bci.bcplm
137131
bci.BGGM <- bci.bcplm
138132

139133

140-
141134
#' @rdname bci
142135
#' @export
143136
bci.sim.merMod <- function(x,
@@ -161,7 +154,6 @@ bci.sim.merMod <- function(x,
161154
}
162155

163156

164-
165157
#' @rdname bci
166158
#' @export
167159
bci.sim <- function(x, ci = 0.95, parameters = NULL, verbose = TRUE, ...) {
@@ -178,7 +170,6 @@ bci.sim <- function(x, ci = 0.95, parameters = NULL, verbose = TRUE, ...) {
178170
}
179171

180172

181-
182173
#' @rdname bci
183174
#' @export
184175
bci.emmGrid <- function(x, ci = 0.95, verbose = TRUE, ...) {
@@ -249,7 +240,6 @@ bci.stanfit <- bci.stanreg
249240
bci.blavaan <- bci.stanreg
250241

251242

252-
253243
#' @rdname bci
254244
#' @export
255245
bci.brmsfit <- function(x, ci = 0.95, effects = c("fixed", "random", "all"),
@@ -279,7 +269,6 @@ bci.brmsfit <- function(x, ci = 0.95, effects = c("fixed", "random", "all"),
279269
}
280270

281271

282-
283272
#' @rdname bci
284273
#' @export
285274
bci.BFBayesFactor <- function(x, ci = 0.95, verbose = TRUE, ...) {

R/check_prior.R

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,6 @@ check_prior <- function(model, method = "gelman", simulate_priors = TRUE, ...) {
5050
}
5151

5252

53-
54-
55-
5653
#' @export
5754
check_prior.brmsfit <- function(model,
5855
method = "gelman",

R/contr.equalprior.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,6 @@ contr.equalprior_deviations <- function(n, contrasts = TRUE, sparse = FALSE) {
184184
}
185185

186186

187-
188187
# OLD ------------------------------
189188

190189
#' @export

R/convert_pd_to_p.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ p_to_pd <- function(p, direction = "two-sided", ...) {
9595
}
9696

9797

98-
9998
#' @rdname pd_to_p
10099
#' @export
101100
convert_p_to_pd <- p_to_pd

R/describe_posterior.R

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,11 @@
1111
#' `"SPI"` (see [`spi()`]), or `"SI"` (see [`si()`]).
1212
#' @param test The indices of effect existence to compute. Character (vector) or
1313
#' list with one or more of these options: `"p_direction"` (or `"pd"`),
14-
#' `"rope"`, `"p_map"`, `"equivalence_test"` (or `"equitest"`),
15-
#' `"bayesfactor"` (or `"bf"`) or `"all"` to compute all tests. For each
16-
#' "test", the corresponding \pkg{bayestestR} function is called (e.g.
17-
#' [`rope()`] or [`p_direction()`]) and its results included in the summary
18-
#' output.
14+
#' `"rope"`, `"p_map"`, `"p_significance"` (or `"ps"`), `"p_rope"`,
15+
#' `"equivalence_test"` (or `"equitest"`), `"bayesfactor"` (or `"bf"`) or
16+
#' `"all"` to compute all tests. For each "test", the corresponding
17+
#' \pkg{bayestestR} function is called (e.g. [`rope()`] or [`p_direction()`])
18+
#' and its results included in the summary output.
1919
#' @param rope_range ROPE's lower and higher bounds. Should be a vector of two
2020
#' values (e.g., `c(-0.1, 0.1)`), `"default"` or a list of numeric vectors of
2121
#' the same length as numbers of parameters. If `"default"`, the bounds are
@@ -528,8 +528,6 @@ describe_posterior.default <- function(posterior, ...) {
528528
}
529529

530530

531-
532-
533531
# Models based on simple data frame of posterior ---------------------
534532

535533

@@ -728,7 +726,6 @@ describe_posterior.draws <- function(posterior,
728726
describe_posterior.rvar <- describe_posterior.draws
729727

730728

731-
732729
# easystats methods ------------------------
733730

734731

@@ -825,8 +822,6 @@ describe_posterior.get_predicted <- function(posterior,
825822
}
826823

827824

828-
829-
830825
# emmeans ---------------------------
831826

832827

@@ -1221,8 +1216,6 @@ describe_posterior.brmsfit <- function(posterior,
12211216
describe_posterior.blavaan <- describe_posterior.stanfit
12221217

12231218

1224-
1225-
12261219
# other models --------------------------------
12271220

12281221

@@ -1345,8 +1338,6 @@ describe_posterior.bamlss <- function(posterior,
13451338
}
13461339

13471340

1348-
1349-
13501341
# BayesFactor --------------------
13511342

13521343

@@ -1431,9 +1422,6 @@ describe_posterior.BFBayesFactor <- function(posterior,
14311422
}
14321423

14331424

1434-
1435-
1436-
14371425
# Helpers -----------------------------------------------------------------
14381426

14391427

R/describe_prior.R

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ describe_prior.brmsfit <- function(model,
5353
# Internal ----------------------------------------------------------------
5454

5555

56-
5756
#' @keywords internal
5857
.describe_prior <- function(model, parameters = NULL, ...) {
5958
priors <- insight::get_priors(model, ...)

R/distribution.R

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ distribution_custom <- function(n, type = "norm", ..., random = FALSE) {
6767
}
6868

6969

70-
71-
72-
73-
7470
#' @rdname distribution
7571
#' @inheritParams stats::rbeta
7672
#' @export
@@ -99,7 +95,6 @@ distribution_binomial <- function(n, size = 1, prob = 0.5, random = FALSE, ...)
9995
distribution_binom <- distribution_binomial
10096

10197

102-
10398
#' @rdname distribution
10499
#' @inheritParams stats::rcauchy
105100
#' @export
@@ -127,7 +122,6 @@ distribution_chisquared <- function(n, df, ncp = 0, random = FALSE, ...) {
127122
distribution_chisq <- distribution_chisquared
128123

129124

130-
131125
#' @rdname distribution
132126
#' @inheritParams stats::rgamma
133127
#' @param shape Shape parameter.
@@ -267,7 +261,6 @@ distribution_uniform <- function(n, min = 0, max = 1, random = FALSE, ...) {
267261
}
268262

269263

270-
271264
#' @rdname distribution
272265
#' @inheritParams stats::rnorm
273266
#' @export

0 commit comments

Comments
 (0)