I want to estimate transition probabilities between different disease states called "Remission", "Mild" and "moderate/severe".

I have an unbalanced panel of 250 patients with time differences between observations of approximately 3 months.

Since the disease states have a natural order, I have estimated an ordered logit model with the polr package and included lagged dummie variables for the disease states, so that it will be possible to calculate transition probabilities between each of the states with the estimates.

The extimated model looks roughly like this:

m <- polr(State_nr ~ 
            lag(Mod_Sev) +
            lag(Mild) +

State_nr being an ordered factor containing the disease states, Mod_Sev and Mild being dummie variables for the specific disease states and Other being other explanatory variables such as BMI or age.

Now I want to test the proportional odds assumption. I have used the brant package by Benjamin Schlegel, but when I run the function on m I get the following error message:

> brant(m)
Error in lag(Mod_Sev) : object 'Mod_Sev' not found

I suppose the problem is that the package cannot handle the lag operator. Does anyone know a simple way to test the assumption when one or more of the explanatory variables are lagged?


1 Answer 1


In the end I created two new variables for lag(Mod_Sev) and lag(Mild) so that I did not need to use the lag() operator in the regression formula.


Your Answer

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

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