Asking for help on lme4 package

Your modid column isn't a grouping variable. It is a unique ID.

That is what is causing your error:

Error: number of levels of each grouping factor must be < number of observations

You could probably drop that column, but also choose an actual grouping variable.

More info: