forked from stan-dev/projpred
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a bug in
get_stat()
's handling of NA
s in case of
subsampled PSIS-LOO CV (`nloo`) with `deltas = TRUE` and `baseline = "best"`. For `baseline = "ref"`, this is only a refactor improving the safety and readability of `get_stat()`'s handling of `NA`s because for `baseline = "ref"`, we should always have no `NA`s in `lppd.bs` and `mu.bs`, so in that case, `n_notna` did not require an adjustment and also because the math operations connecting `mu` and `mu.bs` (analogously for `lppd` and `lppd.bs`) ensured that only the "inner join" of non-`NA` elements (i.e., the set of observations for which both `mu` and `mu.bs` (analogously for `lppd` and `lppd.bs`) are not `NA`) is used. This addresses question 1 from <stan-dev#94 (comment)>.
- Loading branch information
Showing
1 changed file
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters