View source: R/extract_params.R
extract_params | R Documentation |
brms
modelExtract parameters from a brms
model
extract_params(object, car1 = TRUE, draw_ids = NULL)
object |
A |
car1 |
Logical. Extract CAR(1) parameter? |
draw_ids |
Numeric draw ids from the |
A dataframe of draws.
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
)
extract_params(fit, car1 = FALSE, draw_ids = 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.