This is an old version, view current version.

16.8 Ordered logistic distribution

16.8.1 Probability mass function

If KN with K>2, cRK1 such that ck<ck+1 for k{1,,K2}, and ηR, then for k{1,,K}, OrderedLogistic(k | η,c)={1logit1(ηc1)if k=1,logit1(ηck1)logit1(ηck)if 1<k<K,andlogit1(ηcK1)0if k=K. The k=K case is written with the redundant subtraction of zero to illustrate the parallelism of the cases; the k=1 and k=K edge cases can be subsumed into the general definition by setting c0= and cK=+ with logit1()=0 and logit1()=1.

16.8.2 Sampling statement

k ~ ordered_logistic(eta, c)

Increment target log probability density with ordered_logistic_lupmf(k | eta, c).
Available since 2.0

16.8.3 Stan functions

real ordered_logistic_lpmf(ints k | vector eta, vectors c)
The log ordered logistic probability mass of k given linear predictors eta, and cutpoints c.
Available since 2.18

real ordered_logistic_lupmf(ints k | vector eta, vectors c)
The log ordered logistic probability mass of k given linear predictors eta, and cutpoints c dropping constant additive terms.
Available since 2.25

int ordered_logistic_rng(real eta, vector c)
Generate an ordered logistic variate with linear predictor eta and cutpoints c; may only be used in transformed data and generated quantities blocks
Available since 2.0