# Formula for ordinal complementary log-log regression

I have a model developed in R using the polr() function in the MASS package. The model is an ordinal regression with a complementary log-log link (method=cloglog). The model uses four predictors called X1, X2, X3 and X4 and predicts membership of four ordinal outcome classes called A, B, C and D. The coefficients and intercepts are given below.

Coefficients: X1=1.04; X2=-0.59; x3=1.85 ; X4=-.02

Intercepts: A|B=-5.19; B|C=-4.03; C|D=-2.92

I want to calculate the model's predicted probabilities in mapping software (outside R) with X values extracted from raster layers. To do this though I need to know the actual formula to apply to the raster layers.

The help for the polr() function says "The complementary log-log link is the increasing function F-1(p) = log(-log(1-p))" (see attached image for clarity, I had trouble with the formatting).

polr() cloglog link function

Unfortunately this level of maths is above my head. I am hoping that someone can give me the text form of the above formula with my coefficients and X values included (analogous to P(A) = 5.19 + 1.04*X1 - 0.59*X2 +1.85*X3 -.02*X4). I need the predictions in response (probability) scale and not link scale. Many thanks for any help.