0

I am fitting a partial proportional odds cumulative logit ordinal regression model. Response is an ordinal diagnosis, predictors are two urinary biomarkers. I fit the model using the following command:

fit=vglm(diagnosis ~ creatinine + LYVE1, data=urine.dat, 
    family=cumulative(parallel=F))
summary(fit)

Afterwards, I often get about 20 of the following warnings:

In slot(family, "validparams")(eta, y, extra = extra) :
    It seems that the nonparallelism assumption has resulted in    
    intersecting linear/additive predictors.  
    Try propodds() or fitting a partial nonproportional odds model or  
    choosing some other link function, etc.

Does anyone understand what is meant by "intersecting linear/additive predictors?" From what I have seen, this error is returned very often with non-proportional odds VGLM models. Just trying to understand what is the issue with the model.

Any insight would be helpful.

Progman
  • 16,827
  • 6
  • 33
  • 48
  • I think the warning comes from assuming a cumulative probability model, but that the estimated model (at least for some iterations) does not appropriately estimate the cumulative probabilities. I'm not sure why there would be a `parallel=FALSE` option, when that is likely to give rise to this error. You could use `multinomial()` instead or use `clm()` from the `ordinal` package where you can specify some or all variables as nominal (the generalized ordered logic model). – DaveArmstrong Apr 23 '22 at 11:55
  • What do you mean by not appropriately estimate the cumulative probabilities? I need parallel=FALSE as the covariates do not satisfy the proportional odds assumption. – Timofei Apr 25 '22 at 20:51
  • I posted an answer that explains. – DaveArmstrong Apr 26 '22 at 12:27

1 Answers1

0

If you look through the VGAM source code, you'll find the following piece that throws the warning:

    probs <-
      if ( .reverse ) {
        ccump <- cbind(1, eta2theta(eta, .link , earg = .earg ))
        cbind(-tapplymat1(ccump, "diff"), ccump[, ncol(ccump)])
      } else {
        cump <- cbind(eta2theta(eta, .link , earg = .earg ), 1)
        cbind(cump[, 1], tapplymat1(cump, "diff"))
      }
    okay1 <- all(is.finite(probs)) && all(0 < probs & probs < 1)
    if (!okay1)
      warning("It seems that the nonparallelism assumption has ",
              "resulted in intersecting linear/additive ",
              "predictors.  Try propodds() or fitting a partial ",
              "nonproportional odds model or choosing ",
              "some other link function, etc.")

We can boil the guts of this down to a couple of different pieces:

library(VGAM)
#> Loading required package: stats4
#> Loading required package: splines
fit=vglm(cyl ~ wt, data=mtcars, 
         family=cumulative(parallel=F))

eta <- predict(fit, type="link")
cump <- cbind(VGAM:::eta2theta(eta, logitlink ), 1)
probs <- cbind(cump[, 1], tapplymat1(cump, "diff"))

Since cyl has three values, eta is an Nx2 matrix of predicted values on the link scale. cump is the matrix of cumulative probabilities calculated in the usual way for ordered logit. probs is the matrix of category probabilities calculated in the usual way for ordered logit - by subtracting the previous cumulative probability from the current one. Once these are calculated, a flag is generated to identify whether all probabilities are finite and in the theoretical bounds:

okay1 <- all(is.finite(probs)) && all(0 < probs & probs < 1)
#> [1] FALSE

In this case okay1 is FALSE. We can see why below:

all(is.finite(probs))
#> [1] TRUE
all(0 < probs & probs < 1)
#> [1] FALSE

It's because some of the predicted probabilities are negative. We can see which ones below:

ind <- which(probs < 0 | probs > 1, arr.ind=TRUE)[,1]
ind
#> row 
#>  16

probs[ind, ]
#>                    logitlink(P[Y<=2])                    
#>       1.253506e-04      -2.167395e-12       9.998746e-01

Notice here that the predicted probabilities for the second group are negative (though not much different from zero). The takeaway here is that even though you have specified parallel=FALSE, the resulting model is incompatible with the underlying cumulative probability assumption. The warning is encouraging you to use a different model that doesn't calculate probabilities this way, like multinomial logit. For example:

fit2=vglm(cyl ~ wt, data=mtcars, 
         family=multinomial())

which doesn't throw a warning because the probabilities are calculated in a way that won't allow them to be outside [0,1], so long as the exponentiated predicted values on the link scale are finite.

Created on 2022-04-26 by the reprex package (v2.0.1)

DaveArmstrong
  • 18,377
  • 2
  • 13
  • 25
  • Thanks for the great answer. Do you have a link where I might find the source code? I am able to find some, but not the section you are referring to. – Timofei Apr 26 '22 at 21:45
  • @Timofei you can download the source code for the package from [here](https://cran.r-project.org/src/contrib/VGAM_1.1-6.tar.gz). Unzip the file. If you're working in RStudio, you can open a project in the rot folder of the package. Then, you can use Edit >> Find in Folders and search for "propodds()". That will identify two files - familyname.Rd and family.categorical.R. If you look in the family.categorical.R file, you'll find the section I referenced in the answer around line 1535. – DaveArmstrong Apr 28 '22 at 11:45