add_stancode | R Documentation |
Add Stan code to the generated quantities block
add_stancode(scode_raw, new_code, block)
scode_raw |
Stan code generated by |
new_code |
A character string containing Stan code to add to the generated quantities block |
block |
Specify the code block to modify. |
A Stan program of class brmsmodel
.
library("brms")
data <- read.csv(paste0(system.file("extdata", package = "bgamcar1"), "/data_car1.csv"))
scode <- make_stancode(bf(y ~ ar(time = x)), data)
add_stancode(scode, "\n // add new code here:", block = "generated quantities")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.