plot.ppc: Plot posterior predictive samples

Description Usage Arguments Examples

View source: R/methods_ppc.R

Description

Plotting is only possible if you choose to return 'return_samples=TRUE' in evaluate_ppc()

Usage

1
2
3
## S3 method for class 'ppc'
plot(ppc, type = c("normality", "heteroskedasticity",
  "independence"))

Arguments

ppc

a posterior predictive check object (ppc)

type

one of 'normality', 'heteroskedasticity' or 'independence'

Examples

1
2
3
4
5
6
7
8
data("directors")
fit <- blm("Compensation ~ Age", data=directors) %>%
   sample_posterior()
# Calculate PPC
fit <- fit %>%
   evaluate_ppc(return_samples=TRUE)
# Plot
plot(fit %>% get_value('ppc'), 'normality')

JasperHG90/blm documentation built on Sept. 4, 2019, 11:16 a.m.