Skip to content
Prev 2376 / 20628 Next

increasing nAGQ causes error

Hmmm.  What version of lme4 are you using?  I have a
perhaps-more-recent version which gives me a different error:

  from sessionInfo()

other attached packages:
[1] lme4_0.999375-29   Matrix_0.999375-25 lattice_0.17-25
Error in mer_finalize(ans) : Downdated X'X is not positive definite, 1.

  This is a more intentional and more standard error message which
basically means (?) that there has been a numerical/convergence problem
along the way ... (I'm not sure what the "1." means, haven't looked into
it).

  If I were in your position I might be satisfied with Laplace -- is
there a particular reason you need the greater accuracy of AGQ ... ?

  I am running the test code below and have so far figured out that
it happens for nAGQ=8 (but not for 2, 3, 4, 5) when one uses the
first 10 cities (but OK for up to 9).  It's OK for 11 cities
for all nAGQ tried (oddly enough, but this is not terribly surprising
when things are on th edge of numerical stability).  Haven't yet seen
how the rest of the pattern plays out.

  -------------------
testvals <- list()
nlev <- length(levels(subset2$CITY))
agqvals <- c(2,3,4,5,8)
for (i in 9:nlev) {
  testvals[[i-8]] <- list()
  for (j in 1:length(agqvals)) {
    agq <- agqvals[j]
    cat("***",i,agq,"\n")
    testvals[[i-8]][[j]]<-try(glmer(USED~1+IMPS+(1+IMPS|CITY),
                                family=binomial,data=subset2,
                                subset=as.numeric(CITY)<i,nAGQ=agq))

   ## should have used <=i rather than <i ...
  }
}
Grant T. Stokke wrote: