Skip to content

Commit 50877dc

Browse files
authored
Prepare CRAN release (#736)
* Prepare CRAN release * update readme * remove remotes, insight is on CRAN
1 parent c522a7c commit 50877dc

8 files changed

Lines changed: 30 additions & 49 deletions

File tree

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.16.1.11
4+
Version: 0.17.0
55
Authors@R:
66
c(person(given = "Dominique",
77
family = "Makowski",
@@ -66,7 +66,7 @@ Description: Provides utilities to describe posterior
6666
Depends:
6767
R (>= 3.6)
6868
Imports:
69-
insight (>= 1.3.1),
69+
insight (>= 1.4.1),
7070
datawizard (>= 1.2.0),
7171
graphics,
7272
methods,
@@ -95,7 +95,7 @@ Suggests:
9595
lavaan,
9696
lme4,
9797
logspline (>= 2.1.21),
98-
marginaleffects (>= 0.26.0),
98+
marginaleffects (>= 0.29.0),
9999
MASS,
100100
mclust,
101101
mediation,
@@ -129,4 +129,3 @@ Config/testthat/parallel: true
129129
Config/rcmdcheck/ignore-inconsequential-notes: true
130130
Config/Needs/website: easystats/easystatstemplate
131131
Config/Needs/check: stan-dev/cmdstanr
132-
Remotes: easystats/insight, vincentarelbundock/marginaleffects

NEWS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# bayestestR (devel)
1+
# bayestestR 0.17.0
22

33
## Changes
44

R/append_datagrid.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
if (inherits(object, c("emmGrid", "emm_list"))) {
1717
model <- attributes(object)$model
1818
} else {
19-
insight::check_if_installed("marginaleffects")
19+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
2020
model <- marginaleffects::components(object, "model")
2121
}
2222
if (!long && !is.null(model)) {

R/is_baysian_grid.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
#' @keywords internal
2222
.is_baysian_grid.slopes <- function(x) {
23-
insight::check_if_installed("marginaleffects")
23+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
2424
!is.null(suppressWarnings(marginaleffects::get_draws(x, "PxD")))
2525
}
2626

R/utils.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@
219219
#' @keywords internal
220220
.get_marginaleffects_draws <- function(object) {
221221
# errors and checks are handled by marginaleffects
222-
insight::check_if_installed("marginaleffects", minimum_version = "0.24.0")
222+
insight::check_if_installed("marginaleffects", minimum_version = "0.29.0")
223223
as.data.frame(marginaleffects::get_draws(object, shape = "DxP"))
224224
}
225225

README.md

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ describe_posterior(
156156
##
157157
## Parameter | Median | 95% CI | pd | ps
158158
## ----------------------------------------------------
159-
## Posterior | 8.95e-03 | [-1.97, 1.94] | 50.37% | 0.47
159+
## Posterior | 5.94e-04 | [-1.91, 1.92] | 50.05% | 0.46
160160
```
161161

162162
`describe_posterior()` works for many objects, including more complex
@@ -188,49 +188,31 @@ describe_posterior(
188188

189189
## Summary of Posterior Distribution
190190
##
191-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
192-
## --------------------------------------------------------------------------------------
193-
## (Intercept) | 0.96 | 0.96 | 0.96 | [-0.81, 2.51] | 90.00% | 0.88 | 1.011 | 110.00
194-
## child | -1.16 | -1.16 | -1.16 | [-1.36, -0.94] | 100% | 1.00 | 0.996 | 278.00
195-
## camper | 0.73 | 0.72 | 0.73 | [ 0.54, 0.91] | 100% | 1.00 | 0.996 | 271.00
191+
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
192+
## -----------------------------------------------------------------------------------
193+
## (Intercept) | 0.96 | 0.96 | 0.96 | [-0.81, 2.51] | 90.00% | 0.88 | 1.011 | 110
194+
## child | -1.16 | -1.16 | -1.16 | [-1.36, -0.94] | 100% | 1.00 | 0.996 | 278
195+
## camper | 0.73 | 0.72 | 0.73 | [ 0.54, 0.91] | 100% | 1.00 | 0.996 | 271
196196
##
197197
## # Fixed effects (zero-inflated)
198198
##
199-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
200-
## --------------------------------------------------------------------------------------
201-
## (Intercept) | -0.48 | -0.51 | -0.22 | [-2.03, 0.89] | 78.00% | 0.73 | 0.997 | 138.00
202-
## child | 1.85 | 1.86 | 1.81 | [ 1.19, 2.54] | 100% | 1.00 | 0.996 | 303.00
203-
## camper | -0.88 | -0.86 | -0.99 | [-1.61, -0.07] | 98.40% | 0.96 | 0.996 | 292.00
199+
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
200+
## -----------------------------------------------------------------------------------
201+
## (Intercept) | -0.48 | -0.51 | -0.22 | [-2.03, 0.89] | 78.00% | 0.73 | 0.997 | 138
202+
## child | 1.85 | 1.86 | 1.81 | [ 1.19, 2.54] | 100% | 1.00 | 0.996 | 303
203+
## camper | -0.88 | -0.86 | -0.99 | [-1.61, -0.07] | 98.40% | 0.96 | 0.996 | 292
204204
##
205-
## # Random effects (conditional) Intercept: persons
205+
## # Random effects (conditional) (SD/Cor: persons)
206206
##
207-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
208-
## ---------------------------------------------------------------------------------------
209-
## persons.1 | -0.99 | -1.01 | -0.84 | [-2.68, 0.80] | 92.00% | 0.90 | 1.007 | 106.00
210-
## persons.2 | -4.65e-03 | -0.04 | 0.03 | [-1.63, 1.66] | 50.00% | 0.45 | 1.013 | 109.00
211-
## persons.3 | 0.69 | 0.66 | 0.69 | [-0.95, 2.34] | 79.60% | 0.78 | 1.010 | 114.00
212-
## persons.4 | 1.57 | 1.56 | 1.56 | [-0.05, 3.29] | 96.80% | 0.96 | 1.009 | 114.00
207+
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
208+
## -------------------------------------------------------------------------------
209+
## (Intercept) | 1.42 | 1.58 | 1.07 | [ 0.71, 3.58] | 100% | 1.00 | 1.010 | 126
213210
##
214-
## # Random effects (zero-inflated) Intercept: persons
211+
## # Random effects (zero-inflated) (SD/Cor: persons)
215212
##
216-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
217-
## ------------------------------------------------------------------------------------
218-
## persons.1 | 1.10 | 1.11 | 1.08 | [-0.23, 2.72] | 94.80% | 0.93 | 0.997 | 166.00
219-
## persons.2 | 0.18 | 0.18 | 0.22 | [-0.94, 1.58] | 63.20% | 0.54 | 0.996 | 154.00
220-
## persons.3 | -0.30 | -0.31 | -0.54 | [-1.79, 1.02] | 64.00% | 0.59 | 0.997 | 154.00
221-
## persons.4 | -1.45 | -1.46 | -1.44 | [-2.90, -0.10] | 98.00% | 0.97 | 1.000 | 189.00
222-
##
223-
## # Random effects (conditional) SD/Cor: persons
224-
##
225-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
226-
## ----------------------------------------------------------------------------------
227-
## (Intercept) | 1.42 | 1.58 | 1.07 | [ 0.71, 3.58] | 100% | 1.00 | 1.010 | 126.00
228-
##
229-
## # Random effects (zero-inflated) SD/Cor: persons
230-
##
231-
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
232-
## ----------------------------------------------------------------------------------
233-
## (Intercept) | 1.30 | 1.49 | 0.99 | [ 0.63, 3.41] | 100% | 1.00 | 0.996 | 129.00
213+
## Parameter | Median | Mean | MAP | 95% CI | pd | ps | Rhat | ESS
214+
## -------------------------------------------------------------------------------
215+
## (Intercept) | 1.30 | 1.49 | 0.99 | [ 0.63, 3.41] | 100% | 1.00 | 0.996 | 129
234216

235217
*bayestestR* also includes [**many other
236218
features**](https://easystats.github.io/bayestestR/reference/index.html)
@@ -362,7 +344,7 @@ posterior <- distribution_normal(10000, 0.4, 0.2)
362344
rope(posterior, range = c(-0.1, 0.1))
363345
## # Proportion of samples inside the ROPE [-0.10, 0.10]:
364346
##
365-
## inside ROPE
347+
## Inside ROPE
366348
## -----------
367349
## 4.40 %
368350
```
@@ -459,7 +441,7 @@ Compute the density of a given point of a distribution.
459441

460442
``` r
461443
density_at(rnorm(1000, 1, 1), 1)
462-
## [1] 0.4
444+
## [1] 0.37
463445
```
464446

465447
## Code of Conduct

tests/testthat/test-describe_posterior.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,7 @@ test_that("describe_posterior: BayesFactor", {
695695

696696
test_that("describe_posterior: response column for marginaleffects", {
697697
skip_if_not(getRversion() >= "4.0", "Don't run with R < 4.0")
698-
skip_if_not_installed("marginaleffects")
698+
skip_if_not_installed("marginaleffects", minimum_version = "0.29.0")
699699
skip_if_not_installed("curl")
700700
skip_if_offline()
701701
skip_if_not_installed("httr2")

tests/testthat/test-marginaleffects.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
skip_on_cran()
22
skip_if_not_installed("withr")
33
skip_if_not_installed("rstanarm")
4-
skip_if_not_installed("marginaleffects", minimum_version = "0.24.1")
4+
skip_if_not_installed("marginaleffects", minimum_version = "0.29.0")
55
skip_if_not_installed("collapse")
66

77
withr::with_environment(

0 commit comments

Comments
 (0)