1

I am trying to make a model using GLMM parts of data as follow (it is a ten years data,just post parts )

id  year    distance1   sum1    sum
1   2006    183.21     5148    3.71 
2   2006    442        1360    3.13 
3   2006    187.33     11455   4.06 
4   2006    795.74     287     2.46 
5   2006    684.69     1485    3.17 
6   2006    552.89     2382    3.38 
7   2006    813.09     553     2.74 
8   2006    525.11     53149   4.73 
9   2006    510.27     29680   4.47 
10  2006    806.29     201     2.31 
11  2006    728.41     207     2.32 
12  2006    770.91     42170   4.63 
13  2006    766.86     11507   4.06 
14  2006    987.29     563     2.75 
15  2006    1250.55    703     2.85 

here is my R code

M1 <- glmer(sum1 ~ distance1 + (1|year),  family = poisson)

there are the warning messages:

1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model failed to converge with max|grad| = 0.236049 (tol = 0.001, component 1)
2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv,  :
  Model is nearly unidentifiable: very large eigenvalue
 - Rescale variables?;Model is nearly unidentifiable: large eigenvalue ratio
 - Rescale variables?

Maybe I need to rescale variables,but I do not know how to do it,or I should change a way. I am non math majors. Please give me some advices, thanks a lot.

Magnolia
  • 11
  • 1
  • 4
  • Do you only have the single year (2006)? If so, that's probably why the model is failing to converge. You can't model that parameter at all if it's only from one year. – Ashe Jun 16 '17 at 13:23
  • I am sorry,just post parts of the data,because it is too long.I have ten years data, from 2006 to 2015. – Magnolia Jun 16 '17 at 13:26
  • what is your purpose of study , why do you want to do rescaling ? State your data. –  Jun 26 '17 at 07:54
  • I try to find a suitable model to exolpre the relation between the distance and the number in different year. Rescaling the variable is the warnning message from the R,because the model failed to converge and nearly unidentifiable. Now I can't fit the model well, so I want to know how to deal with the problem. My data is too long. I can't post all the data. – Magnolia Jun 26 '17 at 14:01

1 Answers1

2

You can rescale with the scale() function, as in scale(distance)

If the algorithm still doesn't converge, increase the number of iterations / try changing the optimizer (see, e.g. here)

If that still doesn't help, your model may simply not be identifiable with your data.

Florian Hartig
  • 6,499
  • 22
  • 36
  • use scale() function, the distance changed,like [1,] -1.71328162 [2,]-1.12096251 [3,] -1.70385176 [4,] -0.31132162 [5,] -0.56549311 [6,] -0.86715723 [7,] -0.27161091 [8,] -0.93074016 [9,] -0.96470598 [10,] -0.28717476. dose it would not change the meaning of the model? I also used the the codemodel – Magnolia Jun 19 '17 at 13:23
  • well, we do the scale to change the values, that's the whole point - maybe https://stats.stackexchange.com/questions/29781/when-conducting-multiple-regression-when-should-you-center-your-predictor-varia helps but otherwise I think you should get in touch with someone that can help you, these are quite basic regression questions – Florian Hartig Jun 20 '17 at 11:47
  • thanks a lot. I study in insect science, having little knowledge about these. Now I try to study regression model. Really appreciate your help O(∩_∩)O – Magnolia Jun 20 '17 at 13:53