Question regarding large data.frame in LMER?
My comment about using poly(Age, 2) instead of I(Age^2) was a suggestion for trying orthogonal polynomials specifically (i.e., not raw=T but the default which is raw=F). The reason is that Age and Age^2 will be very highly correlated, whereas the linear and non-linear part of poly(Age, 2) are not correlated. Can't say if it'll help with your issue, though.
On Mon, 2020-12-14 at 16:00 +0000, Jad Moawad wrote:
Thanks a lot everyone for all the suggestions you have provided, I really appreciate it. I have some replies over some comments and will write what have worked so far. 1) If understood well the comment regarding the duplicates, there was already no id that has the same number twice across different countries and years. 2) I switched the data.frame from tibble to as.dataframe. 3) I use now: poly(agecent, degree=2, raw=T) instead of I(age^2). 4) I tried centering, scaling and/or standardizing my variables but this have not solved the issue. 5) Regarding the question about how many country_years level I have. I have observations (1,150,110) that are nested in *both* individuals (472,604) and country-years (180). In other words, they are cross-classified. In turn, individuals and country-years are *both* nested in countries (30). So the data structure is like a diamond, with a point (observatio