# Ordinal longitudinal data with unequal number of responses

I have a dataset that comprises of about 900 subjects. There are baseline independent variables which can be continuous or not (e.g. sex, age etc.). The "response" variable is a series of measurements of an ordinal scale ranging from 1-6 (with 1 denoting "good" and 6 "bad").

Each individual can have anywhere between 1-27 measurements and each measurement was taken for a specific year after enrolment in the cohort. For example, subject 21 could have 3 measurements (year 1: 2, year 2: 2, year 3: 5), subject 22 could have 7 (year 1: 5, year 2: 6...) and so on.

I have tried fitting mixor with R (after converting to a long format) without success. I also tried MCMCglmm. Generally, however, what would be the best way to model such longitudinal data?

Thank you very much for the reply and apologies for any lack of clarity.

The mixor package in R indeed fits mixed ordinal response models as correctly pointed out. The issue I have been having is that if I add individuals as random intercepts and time points as random slopes, the model just keeps iterating, even with a relatively small number of covariates (although some are factors with many levels). This can last for a few hours.

In terms of the MCMC approach, one issue is how to select a prior for an ordinal response and how to, eventually diagnose correct convergence.

Finally, the GLMMadaptive gives the following error message: mixed_model(score ~ sex + year, random = ~ 1 | id, data = epilepsy_long, family = binomial()) Error in eval(family\$initialize) : y values must be 0 <= y <= 1

Down the line, another obstacle could be how to account for the lack of balance in observations, given that some lack of balance could be due to informative missingness?

My sincere apologies if these questions or their presentation is elementary, but I have searched online quite a bit to find vignettes that could solve these issues - there is not a huge amount out there.

• Please don't assume that readers are familiar with specific software commands or packages. Better to state the type of model you're fitting. However, I glanced at the mixor package, and the description said it fit mixed ordinal models. That's the type of model I would have recommended, and indeed @DimitrisRizopoulos just recommended it. We would need to know more about what "without success" means. Did the model not converge? – Weiwen Ng Jul 29 at 14:31