Dear group, I am trying to use gamm() in mgcv. Here's the scenario. The data frame has approx. 110K observations with information on paediatric readmission binary outcome (Y/N) and total volume of their most responsible physician as the covariate. Since any physician can have multiple patients, the data contains clustering structure which I am trying to account for. My original formula is a <- gamm(readmission~s(volume,fx=F), correlation=corCompSymm(0.1,form=~1|physician), family=binomial) During the first iteration, I received the warning " Incompatible formulas for groups in "random" and "correlation"". Frankly I don't understand what it means. So I looked up the archive and saw one posted by Prof. Thomas Lumley on lme as follows: http://tolstoy.newcastle.edu.au/R/help/00a/0913.html So I changed my formula as this: a <- gamm(readmission~s(volume,fx=F), random=list(physician=~1),family=binomial) However I still get an error message saying "Lapack routine dgesv : system is exactly singular". Can anyone suggest a better way to deal with my problem. Please let me know if you need further details. Thank you so much. Regards, Kel