0

I am trying to fit a linear mixed model to a food purchase dataset to test the trend of the purchase of ultra-processed food between different social-economic groups over five years. Roughly about 10000 households have been sampled each year (most of them are repeated each year). The data comes with a population projection factor which can be inferred to the entire population. E.g. if the factor for a household is 700 that means there are 700 households like this in a particular year in the country. Below is my code with the corresponding results. What troubles me is that I get the warning message that the model is almost unidentifiable. I have tried to rescale the variables but didn't seem to help. Anyone have any ideas how I can resolve this? Thank you!

lmer(per_capita_year ~ irsad5.factor*year_record + lifestage_factor +  num_child + num_adult + region_factor + (1|hhid),
     data = want.year,
     subset=(ultra_process=="Ultra-processed"),
     weights=factor,
     control=lmerControl(optimizer = "optimx", optCtrl = list(method='nlminb')))

enter image description here

enter image description here

user438383
  • 5,716
  • 8
  • 28
  • 43
Polly
  • 13
  • 2
  • 1
    https://rstudio-pubs-static.s3.amazonaws.com/33653_57fc7b8e5d484c909b615d8633c01d51.html in above link, 1. Rescale and center continuous parameters, 2.Check singularity, 3. Double-checking gradient calculations, ..... would you mind following these steps? – Park Aug 23 '21 at 06:54
  • It looks like your dependent variable has a large scale and high variance. Just scale it down by a factor of 100 and try again (don't forget to account for the rescaling in the interpretation of your results). – Martin Wettstein Aug 23 '21 at 08:24

0 Answers0