This is the code I'm using which has the error message fails to converge
Q1glmm3<-lmer(log10.stock ~ log10.GDP +(log10.GDP|Area) + (Year|Area), data=LOG10.STOCK.VS.GDP.GLMM)
Warning messages:
1: In checkConv(attr(opt, "derivs"), opt$par, ctrl =
control$checkConv, :
unable to evaluate scaled gradient
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl =
control$checkConv, :
Model failed to converge: degenerate Hessian with 3 negative
eigenvalues
3: Model failed to converge with 3 negative eigenvalues: -2.9e-02
-1.5e+00 -2.7e+03
I have also tried to center the GDP data, the model then wouldn't run and this is the error message
CenteredQ1M3<-lmer(Stock.Head ~ Centered.GDP + (Centered.GDP|Area)
+ (Year|Area), data= Trial.LOG10.STOCK.VS.GDP.GLMM)
Error in initializePtr() : Downdated VtV is not positive definite
In addition: Warning message:
Some predictor variables are on very different scales: consider
rescaling
And when I scaled the data - although the model ran - this is the message I got:- Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 3 negative 3: Model failed to converge with 3 negative eigenvalues: -5.5e-02 -8.8e-02 -7.8e-01
The model did run - but this is the message I got at the bottom .. optimizer (nloptwrap) convergence code: 0 (OK) unable to evaluate scaled gradient Model failed to converge: degenerate Hessian with 3 negative eigenvalues
summary(STOCK.VS.GDP.GLMM)
Area Year Stock.Head GDP
C\xf4te d'Ivoire: 11 Min. :2010 Min. : 111 Min. :1.974e+08
T\xfcrkiye : 11 1st Qu.:2012 1st Qu.: 203234 1st Qu.:1.037e+10
Afghanistan : 11 Median :2015 Median : 1524580 Median :3.591e+10
Albania : 11 Mean :2015 Mean : 8025244 Mean :4.703e+11
Algeria : 11 3rd Qu.:2018 3rd Qu.: 5540044 3rd Qu.:2.194e+11
Angola : 11 Max. :2020 Max. :218190768 Max. :2.137e+13
(Other) :2022 NA's :1
X
:2086
checked: 2