I am building an ordinal logistic regression model (ORM). In order to fit my ORM model, I am using the 'orm' function of 'rms' package from R (http://cran.r-project.org/web/packages/rms/rms.pdf).

Now I am trying to assess the goodness of fit of my model. By reading the R documentation, I can see the following statement in the 'stat' property of the 'orm' object (p. 98):

(...) Nagelkerke $R^2$ index, the $g$-index, $gr$ (the $g$-index on the odds ratio scale), and pdm (the mean absolute difference between 0.5 and the predicted probability that $Y\geq q$ the marginal median) (...).

I don't have enough background to understand the short description of the pdm measure. But when I try to do more research on this measure, I am not able to find related material (e.g. I've been finding "prescription drug misuse"). In summary, my question is:

Would you know if the 'pdm' measure has some synonym which is more widely used? Or can you provide some references where I can study the pdm metric?

  • $\begingroup$ I've tried to look it up possibly it is related to D. R. Cox "Two further applications of a model for binary regression" Biometrika , Dec., 1958, Vol. 45, No. 3/4 (Dec., 1958), pp. 562-565 but I could not make it work. $\endgroup$ Mar 24, 2022 at 11:09
  • $\begingroup$ @FrankHarrell you wrote that package not? $\endgroup$ Mar 24, 2022 at 11:43

2 Answers 2


I don't know yet about the background of the statistic but below is an illustration how it is computed.

$$pdm = \frac{1}{n} \sum_{k=1}^n \left| \hat{P}(Y \geq median|X_k) - 0.5 \right| $$

It is an indication of how much the conditional predicted probability varies around the point of the marginal median.


###  generate some data according to a logit model
n = 10^2
k = 5
x = runif(n,-2,2)  # predictor
noise = rnorm(n,0,1)   # noise
y = x + noise        # latent variable
bounds = seq(-2,2,1) # values to be predicted
z = as.numeric(sapply(y, FUN = function(yi) sum(bounds<yi)))  # ordinal variable

### compute ordinal regression
mod = orm(z ~ x, family =probit)

### marginal median of the data
median = mod$stats[3]
### predictions hat p(y>=median | x) for all x in the data
pr = coef(mod)[median] + coef(mod)[k+1]*x
prs = pnorm(pr)
### mean absolute deviation  ... 0.3308655
### value from the function  ... 0.3308655
  • $\begingroup$ That's it. The idea behind this probability is that if the model has not discrimination ability ($R^{2} = D_{xy} = \rho = 0$), it will estimate the same probability of $Y\geq y$ for every observation. And depending on how one handles ties the probability of exceeding the sample median will be 0.5 for all $X$. How far from 0.5 it actually predicts across $X$ is a measure of discrimination ability. As an aside, I'm adding some new pseudo $R^2$ measures to the rms package as described here. $\endgroup$ Mar 24, 2022 at 11:54

This link: https://www.rdocumentation.org/packages/rms/versions/5.1-0/topics/validate.lrm describes pdm as a "new" metric, which would imply that is has not been used before.

  • $\begingroup$ If this is new why would a question about it have come up in 2014? $\endgroup$ May 10, 2017 at 13:36
  • $\begingroup$ I meant new in the sense of not previously reported in the literature, or used outside of the rms package. I myself am not sure, I am just going on based on what they are saying in the package it sounds like this is a new metric they came up with, as opposed to a standard metric that they gave a different name to. $\endgroup$
    – Josh
    May 10, 2017 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.