Random Effect Estimation Error

reprex runs your code on a clean R session with an empty environment, so nothing exists there, you have to define dataCG1 inside the code you are passing to the reprex() function. Please read this guide to learn how to make a proper reprex.