Skip to content

Commit 7c874ab

Browse files
authored
Merge pull request #235 from easystats/dev
CRAN 0.3.0
2 parents 0d7cbb2 + ea24dca commit 7c874ab

97 files changed

Lines changed: 1668 additions & 1352 deletions

File tree

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: bayestestR
22
Type: Package
33
Title: Understand and Describe Bayesian Models and Posterior Distributions
4-
Version: 0.2.5.9000
4+
Version: 0.3.0
55
Authors@R: c(
66
person("Dominique",
77
"Makowski",

R/ci.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#' ci(df, method = "HDI", ci = c(.80, .89, .95))
4040
#'
4141
#' library(rstanarm)
42-
#' model <- stan_glm(mpg ~ wt, data = mtcars, chains = 2, iter = 200)
42+
#' model <- stan_glm(mpg ~ wt, data = mtcars, chains = 2, iter = 200, refresh = 0)
4343
#' ci(model, method = "ETI", ci = c(.80, .89))
4444
#' ci(model, method = "HDI", ci = c(.80, .89))
4545
#' \dontrun{

R/hdi.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
#' hdi(df, ci = c(.80, .90, .95))
6666
#'
6767
#' library(rstanarm)
68-
#' model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200)
68+
#' model <- stan_glm(mpg ~ wt + gear, data = mtcars, chains = 2, iter = 200, refresh = 0)
6969
#' hdi(model)
7070
#' hdi(model, ci = c(.80, .90, .95))
7171
#'

R/mcse.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#' library(bayestestR)
1818
#' library(rstanarm)
1919
#'
20-
#' model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1)
20+
#' model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
2121
#' mcse(model)
2222
#' @importFrom insight get_parameters
2323
#' @export

R/simulate_prior.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#' library(bayestestR)
1010
#' library(rstanarm)
1111
#'
12-
#' model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1)
12+
#' model <- stan_glm(mpg ~ wt + am, data = mtcars, chains = 1, refresh = 0)
1313
#' simulate_prior(model)
1414
#' @export
1515
simulate_prior <- function(model, n = 1000, ...) {

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ Existing R packages allow users to easily fit a large variety of models and extr
4242

4343
You can reference the package and its documentation as follows:
4444

45-
- Makowski, Ben-Shachar, \& Lüdecke (2019). *bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework*. Journal of Open Source Software, 4(40), 1541, https://doi.org/10.21105/joss.01541
46-
45+
- Makowski, D., Ben-Shachar, M. S., \& Lüdecke, D. (2019). *bayestestR: Describing Effects and their Uncertainty, Existence and Significance within the Bayesian Framework*. Journal of Open Source Software, 4(40), 1541. https://doi.org/10.21105/joss.01541
46+
- Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., \& Lüdecke, D. (2019). *Indices of Effect Existence and Significance in the Bayesian Framework*. *Under review*. https://doi.org/10.31234/osf.io/2zexr
4747

4848
## Installation
4949

README.md

Lines changed: 19 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,23 @@ functions to analyze and describe posterior distributions generated by a
1818
variety of models objects, including popular modeling packages such as
1919
**rstanarm**, **brms** or **BayesFactor**.
2020

21-
You can reference our work as follows:
21+
You can reference the package and its documentation as follows:
2222

23-
- Makowski, Ben-Shachar, & Lüdecke (2019). *bayestestR: Describing
24-
Effects and their Uncertainty, Existence and Significance within the
25-
Bayesian Framework*. Journal of Open Source Software, 4(40), 1541,
26-
<https://doi.org/10.21105/joss.01541>
23+
- Makowski, D., Ben-Shachar, M. S., & Lüdecke, D. (2019). *bayestestR:
24+
Describing Effects and their Uncertainty, Existence and Significance
25+
within the Bayesian Framework*. Journal of Open Source Software,
26+
4(40), 1541. <https://doi.org/10.21105/joss.01541>
27+
- Makowski, D., Ben-Shachar, M. S., Chen, S. H. A., & Lüdecke, D.
28+
(2019). *Indices of Effect Existence and Significance in the
29+
Bayesian Framework*. *Under review*.
30+
<https://doi.org/10.31234/osf.io/2zexr>
2731

2832
## Installation
2933

3034
Run the following:
3135

3236
``` r
33-
install.packages("devtools")
34-
devtools::install_github("easystats/bayestestR")
35-
```
36-
37-
``` r
38-
library("bayestestR")
37+
install.packages(bayestestR)
3938
```
4039

4140
## Documentation
@@ -92,9 +91,9 @@ cited below at once.
9291
``` r
9392
describe_posterior(rnorm(1000))
9493
## Parameter Median CI CI_low CI_high pd ROPE_CI ROPE_low ROPE_high
95-
## 1 Posterior -0.018 89 -1.6 1.7 0.51 89 -0.1 0.1
94+
## 1 Posterior 0.039 89 -1.8 1.6 0.52 89 -0.1 0.1
9695
## ROPE_Percentage
97-
## 1 0.086
96+
## 1 0.1
9897
```
9998

10099
## Point-estimates
@@ -113,7 +112,7 @@ map_estimate(posterior)
113112
## MAP = 0.40
114113
```
115114

116-
![](man/figures/unnamed-chunk-6-1.png)<!-- -->
115+
![](man/figures/unnamed-chunk-5-1.png)<!-- -->
117116

118117
## Uncertainty
119118

@@ -156,7 +155,7 @@ eti(posterior, ci = .89)
156155
## [0.42, 7.27]
157156
```
158157

159-
![](man/figures/unnamed-chunk-8-1.png)<!-- -->
158+
![](man/figures/unnamed-chunk-7-1.png)<!-- -->
160159

161160
## Null-Hypothesis Significance Testing (NHST)
162161

@@ -197,7 +196,7 @@ rope(posterior, range = c(-0.1, 0.1))
197196
## 1.11 %
198197
```
199198

200-
![](man/figures/unnamed-chunk-10-1.png)<!-- -->
199+
![](man/figures/unnamed-chunk-9-1.png)<!-- -->
201200

202201
### Equivalence test
203202

@@ -244,12 +243,10 @@ guidelines*](https://easystats.github.io/bayestestR/articles/guidelines.html).
244243
``` r
245244
posterior <- distribution_normal(100, 0.4, 0.2)
246245
p_direction(posterior)
247-
## # Probability of Direction (pd)
248-
##
249246
## pd = 98.00%
250247
```
251248

252-
![](man/figures/unnamed-chunk-13-1.png)<!-- -->
249+
![](man/figures/unnamed-chunk-12-1.png)<!-- -->
253250

254251
### Bayes Factor
255252

@@ -277,12 +274,12 @@ bayesfactor_parameters(posterior, prior, direction = "two-sided", null = 0)
277274
## # Bayes Factor (Savage-Dickey density ratio)
278275
##
279276
## Bayes Factor
280-
## 2
277+
## 2.08
281278
##
282279
## * Evidence Against The Null: [0]
283280
```
284281

285-
![](man/figures/unnamed-chunk-15-1.png)<!-- -->
282+
![](man/figures/unnamed-chunk-14-1.png)<!-- -->
286283

287284
<sup>*The lollipops represent the density of a point-null on the prior
288285
distribution (the blue lollipop on the dotted distribution) and on the
@@ -306,12 +303,10 @@ divided by the density at the Maximum A Posteriori (MAP).
306303
``` r
307304
posterior <- distribution_normal(100, 0.4, 0.2)
308305
p_map(posterior)
309-
## # MAP-based p-value
310-
##
311306
## p (MAP) = 0.193
312307
```
313308

314-
![](man/figures/unnamed-chunk-17-1.png)<!-- -->
309+
![](man/figures/unnamed-chunk-16-1.png)<!-- -->
315310

316311
## Utilities
317312

docs/404.html

Lines changed: 3 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CODE_OF_CONDUCT.html

Lines changed: 14 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/CONTRIBUTING.html

Lines changed: 17 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)