File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ ppc_loo_pit_overlay <- function(y,
189189 geom_line(
190190 aes(color = " y" ),
191191 data = function (x ) dplyr :: filter(x , .data $ is_y ),
192- linewidth = 1 ,
192+ linewidth = 1 ,
193193 lineend = " round" ,
194194 na.rm = TRUE ) +
195195 scale_x_continuous(
@@ -326,21 +326,23 @@ ppc_loo_pit_qq <- function(y,
326326 y_lab <- " LOO-PIT (standard normal quantiles)"
327327 }
328328
329- ggplot(data.frame (p = pit )) +
329+ qq <- ggplot(data.frame (p = pit )) +
330330 geom_qq(
331331 aes(sample = .data $ p ),
332332 distribution = theoretical ,
333333 color = get_color(" m" ),
334334 size = size ,
335335 alpha = alpha ) +
336- geom_qq_line(
337- aes(sample = .data $ p ),
336+ geom_abline(
338337 linetype = 2 ,
339- distribution = theoretical ,
340- color = " black" ,
341- fullrange = FALSE ) +
338+ color = " black" ) +
342339 bayesplot_theme_get() +
343340 labs(x = x_lab , y = y_lab )
341+ if (compare == " uniform" ) {
342+ qq + lims(x = c(0 ,1 ), y = c(0 ,1 ))
343+ } else {
344+ qq
345+ }
344346}
345347
346348
You can’t perform that action at this time.
0 commit comments