Rstanarm log_lik ignores re.form?


#1

Hi!

I am a bit confused by the log_lik function in rstanarm. How come it does not have a re.form argument? I have a linear intercept+slope model (both are varying across subjects) and I am doing this:

lfit <- stan_lmer(dv ~ 1 + l + x + (1 + x | fid), data=ydg_fit)
ll_fit <- log_lik(lfit)
ll_fit_new <- log_lik(lfit, newdata=ydg_fit, re.form=NA)

but these two log lik matrices are exactly the same. I would expect to get the conditional log lik in the first line while I get the marginalized log lik in the second line. Am I mislead here?

Thanks.

Best,
Sebastian


#2

That isn’t implemented. For Gaussian models, we could do that analytically. Otherwise, it would be real slow to do numerically for all posterior draws.