Skip to content

VA underestimates effects in binary models #237

Description

@BertvanderVeen

After implementing glmmVA() and a VA-logit formulation, I have repeated the simulations by Ormerod and Wand (2012) to compare performance of our implementation against their GVA with adaptive-GH quadrature.
There are 3 sets of simulations, each with 2 trials that determine the cluster size of the random intercept. The following figure warranted investigation of our implementation:

Image

As is clear in set 2 and set 3 (the logistic model), our implementation severely underestimates the standard deviation of the random effect. Note,the VA implementation of Ormerod and Wand, which combines logistic regression with AGH-quadrature, does not have same issue.

This is something I have encountered before in probit models in gllvm (diagnosed as estimated LVs taking very small values), but attributed in the usual "VA underestimates variance" way. However, since Ormerod & Wand's GVA implementation does not have the same issue, something else entirely seems to be going on.

The following application to simulated data from set 3 trial 1 (with true parameters beta0 = 0, beta1 = 5, sigma = sqrt(1.5), 15 levels in the random effect and 8 data points per level) demonstrates the issue further:

data.csv

glmmVA.fit <- glmmVA(formula=vy~vx + (1|id), data = data, family = binomial)
glmmEVA.fit <- glmmVA(formula=vy~vx + (1|id), data = data, family = binomial, method = "EVA")
glmmLA.fit <- glmmVA(formula=vy~vx + (1|id), data = data, family = binomial, method = "LA")

where glmmVA.fit produces a very different result to EVA and LA. The model produces the following likelihood profile (which looks slightly different depending on the numerical details of the implementation):

plot(TMB::tmbprofile(glmmVA.fit$TMBfn, "log_sigma"))

Image

Clearly, negative values for log(sigma) receive a better negative log-likelihood. In contrast to EVA and LA on the same data, the VA objective does not seem to have a unique minimum for sigma. This seems odd, given that EVA is supposed to be a less accurate version of VA.

par(mfrow=c(1,2))
plot(TMB::tmbprofile(glmmEVA.fit$TMBfn,"log_sigma", parm.range = c(-10,10)), main = "EVA")
plot(TMB::tmbprofile(glmmLA.fit$TMBfn,"log_sigma", parm.range = c(-10,10)), main = "LA")
Image

Investigating this fit with tmbstan in the following manner, produces the following posterior for the log standard deviation:

library(tmbstan)
m <- tmbstan(glmmVA.fit$TMBfn, seed = 101, iter = 10e3)
hist(m@sim$samples[[1]]$log_sigma, col="transparent")
hist(m@sim$samples[[2]]$log_sigma, col="transparent", border = "blue", add = TRUE, lty = "dotted")
hist(m@sim$samples[[3]]$log_sigma, col="transparent", border = "red", add = TRUE, lty = "dotdash")
hist(m@sim$samples[[4]]$log_sigma, col="transparent", border = "orange", add = TRUE, lty = "longdash")
traceplot(m, "log_sigma")
Image Image

So that it is clear the model formulation is not the issue: MCMC shows the posterior to be centered far away from zero, and it does not even have a mode at zero as one might expect. At this point, it is not clear to me what is going on, or how to fix it.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions