@@ -316,7 +316,7 @@ update.psis_loo_ss <- function(object, ...,
316316 stopifnot(is.data.frame(data ) || is.matrix(data ) & ! is.null(draws ))
317317 }
318318
319- # Compute subsample indecies
319+ # Compute subsample indices
320320 if (length(observations ) > 1 ) {
321321 idxs <- compute_idxs(observations )
322322 } else {
@@ -448,7 +448,7 @@ nobs.psis_loo_ss <- function(object, ...) {
448448# ' @details
449449# ' The choice `psis` is returned if a `psis_loo` object
450450# ' is converted to a `psis_loo_ss` object with `as.psis_loo_ss()`.
451- # ' But `psis` cannot be chosen in the api of `loo_subsample()`.
451+ # ' But `psis` cannot be chosen in the API of `loo_subsample()`.
452452# '
453453# ' @noRd
454454# ' @param api The choices available in the loo API or all possible choices.
@@ -756,7 +756,7 @@ compute_idxs <- function(observations) {
756756}
757757
758758
759- # ' Compare the indecies to prepare handling
759+ # ' Compare the indices to prepare handling
760760# '
761761# ' @details
762762# ' The function compares the object and sampled indices into `new`
@@ -1193,14 +1193,15 @@ srs_diff_est <- function(y_approx, y, y_idx) {
11931193 # eq (9) first row second `+` should be `-`
11941194 # Supplementary material eq (6) has this correct
11951195 # Here the variance is for sum, while in the paper the variance is for mean
1196- # which explains the proporional difference of 1/n
1196+ # which explains the proportional difference of 1/N
11971197 est_list $ hat_v_y <- (t_pi2_tilde + t_hat_epsilon ) - # a (has been checked)
11981198 (1 / N ) * (t_e ^ 2 - est_list $ v_y_hat + 2 * t_pi_tilde * est_list $ y_hat - t_pi_tilde ^ 2 ) # b
11991199 est_list
12001200}
12011201
12021202
1203- # ' Estimate elpd using the standard SRS estimator and SRS WOR
1203+ # ' Estimate elpd using the standard simple-re-sample without
1204+ # ' resampling (SRS-WOR) estimator
12041205# ' @noRd
12051206# ' @param x A `psis_loo_ss` object.
12061207# ' @return A `psis_loo_ss` object.
@@ -1220,7 +1221,7 @@ loo_subsample_estimation_srs <- function(x) {
12201221 update_psis_loo_ss_estimates(x )
12211222}
12221223
1223- # ' Simple SRS-WOR estimation
1224+ # ' Simple-re-sample without resampling ( SRS-WOR) estimation
12241225# ' @noRd
12251226# ' @param y The values observed.
12261227# ' @param y_approx A vector of length N.
@@ -1324,6 +1325,3 @@ assert_subsampling_pointwise <- function(x) {
13241325 checkmate :: assert_names(colnames(x ), identical.to = c(" elpd_loo" , " mcse_elpd_loo" , " p_loo" , " looic" , " influence_pareto_k" , " idx" , " m_i" , " elpd_loo_approx" ))
13251326 x
13261327}
1327-
1328-
1329-
0 commit comments