[R-sig-ME] Cross-validated likelihood, cont.

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Mon Apr 29 07:10:23 CEST 2019


On 29/04/19 4:25 PM, D. Rizopoulos wrote:

> If you want you could give a try to the GLMMadaptive package that 
> implements the adaptive Gaussian quadrature for a vector of random 
> effects (e.g., intercepts and slopes as in your case), and from which 
> you get the log-likelihood in two steps, e.g.,
> 
> library(GLMMadaptive)
> # the log-likelihood at the initial values
> fm <- mixed_model(cbind(Dead, Alive) ~ (Trt + 0) / Dose, random = ~ Dose 
> | Rep,
>    data = Ts, family = binomial(link = ‘cloglog’), iter_EM = 0, 
> iter_qN_outer = 0)
> logLik(fm)
> 
> # the log-likelihood at user-specified values
> gm <-  mixed_model(cbind(Dead, Alive) ~ (Trt + 0) / Dose, random = ~ 
> Dose | Rep,
>    data = Ts, family = binomial(link = ‘cloglog’), iter_EM = 0, 
> iter_qN_outer = 0,
>    initial_values = list(beta = <put_your_fixed_effects_here>, D = 
> <put_the_RE_cov_matrix_here>))
> logLik(gm)

This looks promising; I'll give it a go.  I will probably have to come 
back and pester you with questions once I get started.  Hope you don't mind.

cheers,

Rolf

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



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