On Thu, 2005-12-01 at 10:13 +0000, Prof Brian Ripley wrote: > On Thu, 1 Dec 2005, Martin Maechler wrote: > > >>>>>> "Rick" == Rick Bilonick <[EMAIL PROTECTED]> > >>>>>> on Wed, 30 Nov 2005 23:11:07 -0500 writes: > > > > Rick> I'm trying to fit a generalized mixed effects model to a data set > > where > > Rick> each subject has paired categorical responses y (so I'm trying to > > use a > > Rick> binomial logit link). There are about 183 observations and one > > Rick> explanatory factor x. I'm trying to fit something like: > > > > Rick> (lmer(y~x+(1|subject))) > > > > If you want binomial you have to give ' family = binomial ' to lmer ! > > I noticed that, but he did say `something like'. You need to specify the > family for gee and glmmPQL too. > > I think the moral is to give the exact code you use. > > > Further, always using 'data = ..' is generally recommended practice, > > and I'd rather assign the result of lmer(.) than just print it, > > i.e. (if you want to print too): > > > > (model1 <- lmer(y ~ x + (1|subject), data = <your DFrame>, family = > > binomial)) > > > > and in your case y should be the 2-column matrix > > cbind(successes, failures) > > Not necessarily. If these are binary responses, you can just give y as > shown. Sorry, here is the more complete information:
(lmer(y~x+(1|subject),data=mydata,family=binomial)) y consists of zeroes and ones. At the time I was able to post I was working from memory unfortunately. I did use "family=binomial" for all the models. I get the same results whether I assign the results or not. I was just trying to give the basic syntax for the model. Sorry for any confusion. As I said, I think it has to do with the fact that the responses are so highly correlated. The same data fails to converge when using SAS and the glimmix macro (I don't yet have accesss to the new "proc glimmix".) I also made up some artificial data sets and whenever the paired responses were identical the same problem appeared. Unfortunately I can't share the data sets. Do I need to specify the correlation structure explicitly? I thought my data set was similar to others that used the same type of model and functions successfully. Rick B. ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html