if (FALSE) {
fit <- clm_stan(rating ~ temp, data = wine)
acf_df <- extract_acf(fit)
head(acf_df)
# Plot ACF for specific parameters
library(ggplot2)
acf_df |>
dplyr::filter(parameter == "beta[1]") |>
ggplot(aes(x = lag, y = acf, color = factor(chain))) +
geom_line() +
geom_hline(yintercept = 0, linetype = "dashed")
}
Run the code above in your browser using DataLab