[R-sig-ME] Log likelihood of a glmer() binomial model .

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Thu Apr 25 11:23:01 CEST 2019

On 20/04/19 12:44 PM, Ben Bolker wrote:


>   Here is an **inefficient** method for computing the likelihood
>     coefs <- unlist(getME(fit,c("theta","beta"))
>     newdev <- update(fit, data=VS, devFunOnly=TRUE)
>     newdev(coefs)


Well I (finally) tried that, and got an error.  Since I haven't a clue 
as to what is going on, there is no way that I can do any debugging.

I'm hoping that Ben, or someone, can tell me what I doing rong ( :-) ).

I have attached a sample data set (simulated; in the file X.txt) and the
code that I used in the file demo.R.  I *think* that *.txt and *.R files 
pass through the list server OK.  This should demonstrate the error that 

If you source demo.R (having made sure that X.txt is in the working 
directory) you will the error message:

> Error in pp$setTheta(theta) : theta size mismatch

The crucial code is essentially copy-and-pasted from Ben's email 
(referred to above) so I have no idea where I'm messing up.

Can anyone enlighten me?  Thanks.



Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: X.txt
URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20190425/b957ab4f/attachment-0001.txt>

More information about the R-sig-mixed-models mailing list