ppc_km_nada | R Documentation |
Generate ECDFs for posterior predictive checks with left-censored data
ppc_km_nada(input, object, draw_ids = 1:200, car1 = TRUE, seed, ...)
input |
A dataframe for which to generate model predictions. |
object |
A |
draw_ids |
Draw IDs from model object. |
car1 |
Logical. Add CAR(1) errors? |
seed |
Set a random seed. |
... |
Arguments passed on to |
A dataframe containing ECDFs generated by NADA::cenfit()
for observations and model predictions.
library("brms")
seed <- 1
data <- read.csv(paste0(system.file("extdata", package = "bgamcar1"), "/data.csv"))
fit <- fit_stan_model(
paste0(system.file("extdata", package = "bgamcar1"), "/test"),
seed,
bf(y | cens(ycens, y2 = y2) ~ 1),
data,
prior(normal(0, 1), class = Intercept),
car1 = FALSE,
save_warmup = FALSE,
chains = 3
)
ppc_km_nada(data, fit, draw_ids = 34, seed = seed, car1 = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.