A multi-variable Bayesian categorical regression model using the iris data.
data(iris) X <- as_data(cbind(1, iris[, 1:4])) y <- model.matrix(~ Species - 1, iris) P <- ncol(X) K <- ncol(y)
beta <- normal(0, 5, dim = c(P, K - 1)) eta <- X %*% beta prob <- imultilogit(eta) distribution(y) <- categorical(prob)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.