120
120
# ' @template args-density-controls
121
121
# ' @param boundary_correction For `ppc_loo_pit_overlay()`, when set to `TRUE`
122
122
# ' (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
124
124
# ' the standard kernel density estimation such as `adjust`, `kernel` and
125
125
# ' `n_dens` are ignored. NOTE: The current implementation only works well for
126
126
# ' continuous observations.
@@ -574,12 +574,12 @@ ppc_loo_ribbon <-
574
574
kernel <- .gaussian(gauss_n , bw )
575
575
npad <- as.integer(grid_len / 5 )
576
576
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)
578
578
f <- c(rev(f [1 : (npad )]),
579
579
f ,
580
580
rev(f )[(grid_len - npad ): (grid_len - 1 )])
581
581
582
- # Convolution: Gaussian filter + reflection trick (pading) works as an
582
+ # Convolution: Gaussian filter + reflection method (pading) works as an
583
583
# averaging moving window based on a Gaussian density which takes care
584
584
# of the density boundary values near 0 and 1.
585
585
bc_pvals <- stats :: filter(f ,
@@ -595,7 +595,7 @@ ppc_loo_ribbon <-
595
595
bw ,
596
596
grid_len ){
597
597
# 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 "
599
599
# to estimate these pvalues and helps speed up the code
600
600
if (any(is.infinite(x ))){
601
601
warning(paste(" Ignored" , sum(is.infinite(x )),
0 commit comments