Skip to content

Commit bb68267

Browse files
committed
Use wine data
1 parent c73be4d commit bb68267

4 files changed

Lines changed: 1633 additions & 78 deletions

File tree

R/sysdata.rda

38.5 MB
Binary file not shown.

data-raw/wine-loglik.R

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
library(brms)
2+
library(loo)
3+
options(brms.backend = "cmdstanr")
4+
options(mc.cores = 4)
5+
6+
fitos <- read.delim("data-raw/winequality-red.csv", sep = ";") |>
7+
unique() |>
8+
scale() |>
9+
as.data.frame() |>
10+
brm(
11+
ordered(quality) ~ .,
12+
family = cumulative("logit"),
13+
prior = prior(R2D2(mean_R2 = 1 / 3, prec_R2 = 3)),
14+
data = _,
15+
seed = 1,
16+
silent = 2,
17+
refresh = 0
18+
)
19+
20+
.wine_log_lik_matrix <- log_lik(fitos)
21+
usethis::use_data(.wine_log_lik_matrix, internal = TRUE, overwrite = TRUE)

0 commit comments

Comments
 (0)