Cutpoint priors in ordinal models

Hello everyone,

Just wanted to share a small trick for modelling cutpoints in ordinal models. I’ve seen the suggestion before that we can model cutpoints as transformed from simplex (theta), a scale (kappa) and a location (mu):


data{
int N;
int response[N];  
vector[N] x;

parameters{
simplex[5]  theta;
real<lower=0> kappa;
real mu;
real beta;
}

transformed parameters{
ordered[5]  cutoffs;
cutoffs=cumulative_sum(theta)*kappa+mu;
}

model{
theta~dirichlet(rep_vector(1, 5));
kappa~exponential(.1);

for (n in 1:N){
response[n]~ordered_logistic(x[n]*beta , cutoffs );
}

…but this has the annoying feature that the prior center for the cutoffs is a hodgepodge function of theta, kappa and mu. So how about removing the median from the cum-sum, such that the parameter mu is the center of the cutpoint vector?:

functions{
real median(vector ordered_vector){
int midpoint;
midpoint = rows(ordered_vector)/2;
if(2*midpoint<rows(ordered_vector)){
  return ordered_vector[midpoint+1];
}
else{
  return (ordered_vector[midpoint]+ordered_vector[midpoint+1])/2;
}
}

vector cumsum_de_median(vector par_vector){
  return cumulative_sum(par_vector)-median(cumulative_sum(par_vector));
}

}
data{
int N;
int response[N];  
vector[N] x;

parameters{
simplex[5]  theta;
real<lower=0> kappa;
real mu;
real beta;
}

transformed parameters{
ordered[5]  cutoffs;
cutoffs=cumsum_de_median(theta)*kappa+mu;
}

model{
theta~dirichlet(rep_vector(1, 5));
kappa~exponential(.1);

for (n in 1:N){
response[n]~ordered_logistic(x[n]*beta , cutoffs );
}

The interpretation of the parameters makes more sense here (to me, anyways…):

  • mu is the center of the cutpoint vector
  • theta is the normalized distance between cutpoints
  • kappa is the spread of cutpoints

Could use a mean too, I suppose.

1 Like

Thanks for sharing! I am working on a similar model so I will check it out!

Don’t you need to put cumulative_sum(theta) through the logit function in order to get cutpoints on the scale of the linear predictor?

hm - so the linear predictor can take any real value, and cutpoints should be an ordered vector spread on the real line.

First, theta is a (0,1) simplex vector. Kappa is positive. So cumsum(theta)*kappa creates values spread over positive values. Adding mu then give an ordered cutpoint vector spread over the real line.

My point in this post was just to center the cumsum-part, such that mu controls the center of the cutpoints.

Well, the simplex elements can be interpreted as probabilities of falling in that category (for observations with average X values) if you put them through the inverse CDF of the CDF that you use for the linear predictor. That is what we do in stan_polr in rstanarm.

Interesting - never tried rstanarm. Looks like stan_polr handles a binary outcome only?

Model above is an extension of the ordinal logistic model from section 9.8 in the Stan manual, with an ordinal dependent variable with >2 levels (in model above six ordered possible responses). But by changing priors as above you can use similar prior for the mean of the cutpoint for an outcome variable with just two levels.

stan_polr is for at least 2 ordinal outcomes