I'm currently creating linear mixed-effects models in R. I have got a large dataframe df (8000 rows), which I have cleaned up as far as possible (removed unneeded columns etc). The trouble is that the lmer command takes an extremely long time to run:
lmer_model <- lmer(myparameter ~ time * group + (1 | Pat_ID), data = df)
As I write, it has been running for at least 20min on a fast PC with 18% CPU usage by R. Can you recommend any methods to speed the process up, or different methods, in R or other languages?
Edit: The problem turned out to be a numeric column which was incorrectly formatted as character. as.numeric solved the issue.