File tree Expand file tree Collapse file tree 4 files changed +30
-4
lines changed
Expand file tree Collapse file tree 4 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 47824782
47834783# psis throws correct errors and warnings
47844784
4785+ Code
4786+ psis(-LLarr, r_eff = r_eff_arr)
4787+ Message
4788+ If `r_eff` has length `len` but has `NA`s then `NA`s are replaced with 1's.
4789+ Output
4790+ Computed from 1000 by 32 log-weights matrix.
4791+ MCSE and ESS estimates assume MCMC draws (r_eff in [0.6, 1.0]).
4792+
4793+ All Pareto k estimates are good (k < 0.67).
4794+ See help('pareto-k-diagnostic') for details.
4795+
4796+ ---
4797+
47854798 Code
47864799 psis(-LLarr[1:5, , ])
47874800 Condition
Original file line number Diff line number Diff line change 1+ # tis throws correct errors and warnings
2+
3+ Code
4+ psis(-LLarr, r_eff = r_eff_arr)
5+ Message
6+ If `r_eff` has length `len` but has `NA`s then `NA`s are replaced with 1's.
7+ Output
8+ Computed from 1000 by 32 log-weights matrix.
9+ MCSE and ESS estimates assume MCMC draws (r_eff in [0.6, 1.0]).
10+
11+ All Pareto k estimates are good (k < 0.67).
12+ See help('pareto-k-diagnostic') for details.
13+
Original file line number Diff line number Diff line change @@ -70,9 +70,9 @@ test_that("psis throws correct errors and warnings", {
7070 # r_eff non-scalar wrong length is error
7171 expect_error(psis(- LLarr , r_eff = r_eff_arr [- 1 ]), " one value per observation" )
7272
73- # r_eff has some NA values causes error
73+ # r_eff has some NA values which are replaced with 1
7474 r_eff_arr [2 ] <- NA
75- expect_error (psis(- LLarr , r_eff = r_eff_arr ), " mix NA and not NA values " )
75+ expect_snapshot (psis(- LLarr , r_eff = r_eff_arr ))
7676
7777 # tail length warnings
7878 expect_snapshot(psis(- LLarr [1 : 5 , , ]))
Original file line number Diff line number Diff line change @@ -107,9 +107,9 @@ test_that("tis throws correct errors and warnings", {
107107 # r_eff wrong length is error
108108 expect_error(tis(- LLarr , r_eff = r_eff_arr [- 1 ]), " one value per observation" )
109109
110- # r_eff has some NA values causes error
110+ # r_eff has some NA values which are replaced with 1
111111 r_eff_arr [2 ] <- NA
112- expect_error(tis (- LLarr , r_eff = r_eff_arr ), " mix NA and not NA values " )
112+ expect_snapshot(psis (- LLarr , r_eff = r_eff_arr ))
113113
114114 # no NAs or non-finite values allowed
115115 LLmat [1 , 1 ] <- NA
You can’t perform that action at this time.
0 commit comments