Skip to content

Commit ad18ea7

Browse files
committed
add reflection method to help text of ppc_loo_pit_overlay()
1 parent 95275d7 commit ad18ea7

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

R/ppc-loo.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ NULL
120120
#' @template args-density-controls
121121
#' @param boundary_correction For `ppc_loo_pit_overlay()`, when set to `TRUE`
122122
#' (the default) the function will compute boundary corrected density values
123-
#' via convolution and a Gaussian filter. As a result, parameters controlling
123+
#' via convolution and a Gaussian filter (i.e. reflection method). As a result, parameters controlling
124124
#' the standard kernel density estimation such as `adjust`, `kernel` and
125125
#' `n_dens` are ignored. NOTE: The current implementation only works well for
126126
#' continuous observations.
@@ -574,12 +574,12 @@ ppc_loo_ribbon <-
574574
kernel <- .gaussian(gauss_n, bw)
575575
npad <- as.integer(grid_len / 5)
576576

577-
# Reflection trick (i.e. get first N and last N points to pad vector)
577+
# Reflection method (i.e. get first N and last N points to pad vector)
578578
f <- c(rev(f[1:(npad)]),
579579
f,
580580
rev(f)[(grid_len - npad):(grid_len - 1)])
581581

582-
# Convolution: Gaussian filter + reflection trick (pading) works as an
582+
# Convolution: Gaussian filter + reflection method (pading) works as an
583583
# averaging moving window based on a Gaussian density which takes care
584584
# of the density boundary values near 0 and 1.
585585
bc_pvals <- stats::filter(f,
@@ -595,7 +595,7 @@ ppc_loo_ribbon <-
595595
bw,
596596
grid_len){
597597
# Generate boundary corrected values via a linear convolution using a
598-
# 1-D Gaussian window filter. This method uses the "reflection trick"
598+
# 1-D Gaussian window filter. This method uses the "reflection method"
599599
# to estimate these pvalues and helps speed up the code
600600
if (any(is.infinite(x))){
601601
warning(paste("Ignored", sum(is.infinite(x)),

man/PPC-loo.Rd

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

0 commit comments

Comments
 (0)