Here is the changes I made on a new branch. Sorry about the messy commit history, I merged in some old work I did on communityPGLMM awhile ago and never got around to PRing. Hopefully nothing else got too messed up. I notice a couple changes I didn't make in the diff (for example in pcd.R and utils.R). You might want to double check these.
Hi Daijiang,
Here is the changes I made on a new branch. Sorry about the messy commit history, I merged in some old work I did on communityPGLMM awhile ago and never got around to PRing. Hopefully nothing else got too messed up. I notice a couple changes I didn't make in the diff (for example in pcd.R and utils.R). You might want to double check these.