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,
189
189
geom_line(
190
190
aes(color = " y" ),
191
191
data = function (x ) dplyr :: filter(x , .data $ is_y ),
192
- linewidth = 1 ,
192
+ linewidth = 1 ,
193
193
lineend = " round" ,
194
194
na.rm = TRUE ) +
195
195
scale_x_continuous(
@@ -326,21 +326,23 @@ ppc_loo_pit_qq <- function(y,
326
326
y_lab <- " LOO-PIT (standard normal quantiles)"
327
327
}
328
328
329
- ggplot(data.frame (p = pit )) +
329
+ qq <- ggplot(data.frame (p = pit )) +
330
330
geom_qq(
331
331
aes(sample = .data $ p ),
332
332
distribution = theoretical ,
333
333
color = get_color(" m" ),
334
334
size = size ,
335
335
alpha = alpha ) +
336
- geom_qq_line(
337
- aes(sample = .data $ p ),
336
+ geom_abline(
338
337
linetype = 2 ,
339
- distribution = theoretical ,
340
- color = " black" ,
341
- fullrange = FALSE ) +
338
+ color = " black" ) +
342
339
bayesplot_theme_get() +
343
340
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
+ }
344
346
}
345
347
346
348
You can’t perform that action at this time.
0 commit comments