Skip to content

Commit

Permalink
Updated documentation. Especially new recommendations for K in ppc_pi…
Browse files Browse the repository at this point in the history
…t_ecdf*() and mcmc_rank_ecdf().
  • Loading branch information
TeemuSailynoja committed Jan 19, 2024
1 parent 07df2ef commit fdbcf38
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 11 deletions.
4 changes: 2 additions & 2 deletions R/helpers-ppc.R
Original file line number Diff line number Diff line change
Expand Up @@ -416,12 +416,12 @@ adjust_gamma_simulate <- function(N, L, K, prob, M) {
#' simultaneous coverage of the ECDF traces.
#' @noRd
interpolate_gamma <- function(N, K, prob, L) {
# Find the precomputed values ueful for the interpolation task.
# Find the precomputed values useful for the interpolation task.
vals <- get_interpolation_values(N, K, L, prob)
# Largest lower bound and smalles upper bound for N among precomputed values.
N_lb <- max(vals[vals$N <= N, ]$N)
N_ub <- min(vals[vals$N >= N, ]$N)
# Approximate largest lower bound and smalles upper bound for gamma.
# Approximate largest lower bound and smallest upper bound for gamma.
log_gamma_lb <- approx(
x = log(vals[vals$N == N_lb, ]$K),
y = log(vals[vals$N == N_lb, ]$val),
Expand Down
8 changes: 5 additions & 3 deletions man-roxygen/args-pit-ecdf.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#' @param K An optional integer defining the number of equally spaced evaluation
#' points for the ECDF. If the submitted PIT values are known to be discrete,
#' this should be the number of the discrete cases. Defaults to the smaller of
#' `length(y)` and `ncol(yrep)` when applicable.
#' points for the ECDF. Reducing K when using `interpolate_adj = FALSE` makes
#' computing the confidence bands faster. For `ppc_pit_ecdf` and
#' `ppc_pit_ecdf_grouped`, defaults to `ncol(yrep) + 1`, or `length(pit)` if PIT
#' values are supplied. For `mcmc_rank_ecdf` defaults to the number of
#' iterations per chain in `x`.
#' @param prob The desired simultaneous coverage level of the bands around the
#' ECDF. A value in (0,1).
#' @param plot_diff A boolean defining whether to plot the difference between
Expand Down
8 changes: 5 additions & 3 deletions man/MCMC-traces.Rd

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

8 changes: 5 additions & 3 deletions man/PPC-distributions.Rd

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

20 changes: 20 additions & 0 deletions man/bayesplot-package.Rd

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

0 comments on commit fdbcf38

Please sign in to comment.