I have a dataset which contains a categorical outcome, 2 repeated measures over time for the same subject and several covariates
dummy_data = data.frame(ID = seq(1,100), Volumes = rnorm(100, 10,20),
factor = rnorm(100, 0, 2), time = rep(c("PRE", "POST"), 50),
dummy_cov1 = rep(sample(LETTERS[1:4], 50, replace= T), each=2),
dummy_cov2 = rep(sample(LETTERS[3:6], 50, replace = T), each=2),
outcome = factor(rep(sample(0:6, 50, replace = T),each = 2 )))
I would like to fit a model to predict the outcome according to the factor and volume (which are repeated measures for each individual over time), with other covariates which are constant over time.
I have tried linear mixed models using ID as random effects and time as a covariate, but I obtain errors of convergence.
What do you think is the best approach to analyze this dataset?