Skip to content

Commit 10eac64

Browse files
committed
update doc and snaps
1 parent 31940cb commit 10eac64

16 files changed

+375
-370
lines changed

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ Package: bayesplot
22
Type: Package
33
Title: Plotting for Bayesian Models
44
Version: 1.10.0
5-
Date: 2022-11-14
5+
Date: 2022-11-15
66
Authors@R: c(person("Jonah", "Gabry", role = c("aut", "cre"), email = "jsg2201@columbia.edu"),
77
person("Tristan", "Mahr", role = "aut"),
88
person("Paul-Christian", "Bürkner", role = "ctb"),

R/mcmc-traces.R

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,11 @@
6666
#' }
6767
#' \item{`mcmc_rank_ecdf()`}{
6868
#' The ECDFs of the ranks from `mcmc_rank_hist()` are plotted with the
69-
#' simultaneous confidence bands with a coverage determined by `prob`,
70-
#' that is, bands that completely cover all of the rank ECDFs with the
71-
#' probability 'prob'.
72-
#' If plot_diff = TRUE, the difference between the observed rank ECDFs and the
73-
#' theoretical expectation for samples originating from the same distribution
74-
#' is drawn.
75-
#' See Säilynoja et al. (2021) for details.
69+
#' simultaneous confidence bands with a coverage determined by `prob`, that
70+
#' is, bands that completely cover all of the rank ECDFs with the probability
71+
#' `prob`. If `plot_diff = TRUE`, the difference between the observed rank
72+
#' ECDFs and the theoretical expectation for samples originating from the
73+
#' same distribution is drawn. See Säilynoja et al. (2021) for details.
7674
#' }
7775
#' }
7876
#'
@@ -443,7 +441,7 @@ mcmc_rank_hist <- function(x,
443441
#' @param prob For `mcmc_rank_ecdf()`, a value between 0 and 1
444442
#' specifying the desired simultaneous confidence of the confidence bands to be
445443
#' drawn for the rank ECDF plots.
446-
#' @param plot_diff For `mcmc_rank_ecdf()`, a boolean specifying it the
444+
#' @param plot_diff For `mcmc_rank_ecdf()`, a boolean specifying if the
447445
#' difference between the observed rank ECDFs and the theoretical expectation
448446
#' should be drawn instead of the unmodified rank ECDF plots.
449447
#' @export
@@ -456,7 +454,7 @@ mcmc_rank_ecdf <-
456454
K = NULL,
457455
facet_args = list(),
458456
prob = 0.99,
459-
plot_diff = TRUE,
457+
plot_diff = FALSE,
460458
interpolate_adj = NULL) {
461459
check_ignored_arguments(...,
462460
ok_args = c("K", "pit", "prob", "plot_diff", "interpolate_adj", "M")

R/ppc-distributions.R

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,10 +71,10 @@
7171
#' # ppc_ecdf_overlay with continuous data (set discrete=TRUE if discrete data)
7272
#' ppc_ecdf_overlay(y, yrep[sample(nrow(yrep), 25), ])
7373
#'
74-
#' # ECDF and ECDF difference plot of the PIT values of ´y´ compared to ´yrep
74+
#' # ECDF and ECDF difference plot of the PIT values of y compared to yrep
7575
#' # with 99% simultaneous confidence bands.
76-
#' ppc_pit_ecdf(y, yrep, prob = 0.99, plot_diff = FALSE, interpolate_adj = FALSE)
77-
#' ppc_pit_ecdf(y, yrep, prob = 0.99, plot_diff = TRUE, interpolate_adj = FALSE)
76+
#' ppc_pit_ecdf(y, yrep, prob = 0.99, plot_diff = FALSE)
77+
#' ppc_pit_ecdf(y, yrep, prob = 0.99, plot_diff = TRUE)
7878
#' }
7979
#'
8080
#' # for ppc_hist,dens,freqpoly,boxplot definitely use a subset yrep rows so
@@ -107,7 +107,7 @@
107107
#' \donttest{
108108
#' # ECDF difference plots of the PIT values by group
109109
#' # with 99% simultaneous confidence bands.
110-
#' ppc_pit_ecdf_grouped(y, yrep, group=group, prob=0.99, interpolate_adj=FALSE)
110+
#' ppc_pit_ecdf_grouped(y, yrep, group=group, prob=0.99, plot_diff = TRUE)
111111
#' }
112112
#'
113113
#' # don't need to only use small number of rows for ppc_violin_grouped
@@ -580,8 +580,8 @@ ppc_violin_grouped <-
580580

581581
#' @export
582582
#' @param pit An optional vector of probability integral transformed values for
583-
#' which the ECDF is to be drawn. If NULL, PIT values are computed to ´y´ with
584-
#' respect to the corresponding values in ´yrep´.
583+
#' which the ECDF is to be drawn. If NULL, PIT values are computed to `y` with
584+
#' respect to the corresponding values in `yrep`.
585585
#' @rdname PPC-distributions
586586
#'
587587
ppc_pit_ecdf <- function(y,

man-roxygen/args-pit-ecdf.R

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#' @param K An optional integer defining the number of equally spaced evaluation
2-
#' points for the ECDF. If the submitted PIT values are known to be discrete,
3-
#' this should be the number of the discrete cases. Defaults to the smaller of
4-
#' `length(y)` and `ncol(yrep)` when applicable.
2+
#' points for the ECDF. If the submitted PIT values are known to be discrete,
3+
#' this should be the number of the discrete cases. Defaults to the smaller of
4+
#' `length(y)` and `ncol(yrep)` when applicable.
55
#' @param prob The desired simultaneous coverage level of the bands around the
6-
#' ECDF. A value in (0,1).
7-
#' @param plot_diff A boolean defining whether to plot the difference between the
8-
#' observed ECDF and the theoretical expectation for uniform PIT values.
6+
#' ECDF. A value in (0,1).
7+
#' @param plot_diff A boolean defining whether to plot the difference between
8+
#' the observed ECDF and the theoretical expectation for uniform PIT values
9+
#' rather than plotting the regular ECDF. The default is `FALSE`, but for
10+
#' large samples we recommend setting `plot_diff=TRUE` as the difference plot
11+
#' will visually show a more dynamic range.
912
#' @param interpolate_adj A boolean defining if the simultaneous confidence
10-
#' bands should be computed or interpolated from precomputed values. Computing
11-
#' the bands may be computationally intensive and approximation gives a fast
12-
#' method for assessing the ECDF trajectory.
13+
#' bands should be interpolated based on precomputed values rather than
14+
#' computed exactly. Computing the bands may be computationally intensive and
15+
#' the approximation gives a fast method for assessing the ECDF trajectory.
16+
#' The default is to use interpolation if `K` is greater than 200.

man/MCMC-traces.Rd

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

man/PPC-distributions.Rd

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

0 commit comments

Comments
 (0)