Hi all,

This is a follow-up question to a question I posted a few days ago. I  
am fitting multilevel models with lmer, and would like to calculate a  
conditional AIC after Vaida and Blanchard 2005 Biometrika,  
"Conditional Akaike information for mixed-effects models". This  
quantity is to be used when one is making inferences regarding the  
random effects estimates returned by a multilevel model, and the  
'penalty' term is derived from an estimate of the effective degrees  
of freedom. If I understand it correctly, the effective degrees of  
freedom for an lmer object can be obtained with the hatTrace  
function. Code for CAIC would then be as follows:

ML = as.numeric(logLik(model.lmer))
rho = hatTrace(model.lmer)
p = length(fixef(model.lmer))
N = nrow(attr(model.lmer, 'X'))
K.corr = N*(N-p-1)*(rho+1)/((N-p)*(N-p-2)) + N*(p+1)/((N-p)*(N-p-2))
CAIC = -2*ML + 2*K.corr

The point of confusion for me is that the log-likelihood term for the  
conditional AIC is the conditional log-likelihood, i.e. the log- 
likelihood of the data conditional on both the MLEs for the fixed  
effects and the empirical Bayes estimates for the random effects. If  
I understand correctly, lmer returns the marginal likelihood of the  
data conditional on the MLEs of the fixed effects.

Is there a way to calculate this conditional likelihood in R? Or is  
the conditional likelihood approximately equal to the marginal  
likelihood?

Thanks,

Kyle



	[[alternative HTML version deleted]]


