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 ~
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:
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?