Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Ordinal models with with BRMS #33

Open
JCruk opened this issue Oct 21, 2020 · 0 comments
Open

Support for Ordinal models with with BRMS #33

JCruk opened this issue Oct 21, 2020 · 0 comments

Comments

@JCruk
Copy link

JCruk commented Oct 21, 2020

Would it be possible to add support for ordinal models fit with the bayesian BRMS package:

# List required packages 
Pkgs <- c("tidyverse", "ordinal", "brms",  "rstan")

# Load packages ====
lapply(Pkgs, require, c = T)

# Load data
data <- ordinal::wine 

# Model formula
fmla <- bf(Rating ~ temp + contact +temp:contact + 1|judge) ) 

# Compile and fit model
mod <- brm(fmla,
            data = data,
            family = cumulative("probit"),
            inits = 0,
            iter = 2000,
            warmup = 1000,
            chains = 2,
            cores = 2,
            sample_prior = TRUE,
            save_all_pars = TRUE)
        )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant