Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# bayesplot (development version)

* Documentation added for `ppc_data()` and `ppc_loo_pit_data()` functions (#209)
* Improved documentation for `binwidth`, `bins`, and `breaks` arguments to clarify they are passed to `ggplot2::geom_area()` and `ggdist::stat_dots()` in addition to `ggplot2::geom_histogram()`
* Improved documentation for `freq` argument to clarify it applies to frequency polygons in addition to histograms
* Fixed test in `test-ppc-distributions.R` that incorrectly used `ppc_dens()` instead of `ppd_dens()` when testing PPD functions
Expand Down
9 changes: 9 additions & 0 deletions R/ppc-distributions.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@
#'
#' @section Plot Descriptions:
#' \describe{
#' \item{`ppc_data()`}{
#' This function prepares data for plotting with **ggplot2**. It is a
#' general-purpose data-preparation helper used by many `ppc_*()` plotting
#' functions, and users can call it directly to create custom PPC plots using
#' ggplot2. The function returns a data frame that can be used to build ggplot
#' objects. This is useful when you want to customize the appearance of PPC
#' plots beyond what the built-in plotting functions allow, or when you want to
#' construct new types of PPC visualizations based on the same underlying data.
#' }
#' \item{`ppc_hist(), ppc_freqpoly(), ppc_dens(), ppc_boxplot()`}{
#' A separate histogram, shaded frequency polygon, smoothed kernel density
#' estimate, or box and whiskers plot is displayed for `y` and each
Expand Down
13 changes: 12 additions & 1 deletion R/ppc-loo.R
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,21 @@
#' `ppc_loo_ribbon()`, `alpha` and `size` are passed to
#' [ggplot2::geom_ribbon()].
#'
#' @template return-ggplot
#' @template return-ggplot-or-data
#'
#' @section Plot Descriptions:
#' \describe{
#' \item{`ppc_loo_pit_data()`}{
#' This function prepares LOO-PIT data for plotting with **ggplot2**. It is
#' the data-preparation back end for the LOO-PIT plotting functions
#' (`ppc_loo_pit_overlay()`, `ppc_loo_pit_qq()`, and `ppc_loo_pit_ecdf()`),
#' and users can call it directly to create custom LOO-PIT plots using
#' ggplot2. The function computes the leave-one-out probability integral
#' transform (LOO-PIT) values and returns a data frame that can be used to
#' build ggplot objects. This is useful when you want to create custom
#' visualizations of LOO-PIT values beyond what the built-in plotting
#' functions provide.
#' }
#' \item{`ppc_loo_pit_overlay()`, `ppc_loo_pit_qq()`, `ppc_loo_pit_ecdf()`}{
#' The calibration of marginal predictions can be assessed using probability
#' integral transformation (PIT) checks. LOO improves the check by avoiding the
Expand Down
9 changes: 9 additions & 0 deletions man/PPC-distributions.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 15 additions & 1 deletion man/PPC-loo.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading