Skip to content
Prev 8403 / 20628 Next

Bootstrapping glmer random effects

Hi Joe,

I am not sure if I can give you good advice on this but I can try. What I
noticed about your outputs was that you had the same number of observations for
your analysis on the original data and for the last bootstrap output. The number
of cities varied only by 1. This looks like you used your individual
observations as the resampling unit. However, as one other responder has
mentioned already you should use cities as your resampling unit as you have
non-independence between observations within each city. When using city as the
resampling unit you need to include all observations from that city when a city
is picked. You need to also remember to rename your cities after picking them.
For example, if city1 is picked and has, say 4 observations you bring all 4
observations into your bootstrap data and call the city now city1_1 (for
example). Then, when city1 is picked again, bring all 4 observations into your
bootstrap data again and rename city1 to city1_2 for these 4 observations. The
reason you want to do that is that city is your grouping factor for the random
effect and you want to end up with the same number of different cities in your
bootstrap data as in your original data (218 - I believe). I hope this will
work. If you have questions about coding this up I might be able to help you.

Cheers, Cornelia



<>< <>< <>< <>< <>< <>< <><
Cornelia Oedekoven
CREEM
University of St Andrews
cornelia at mcs.st-and.ac.uk
www.creem.st-and.ac.uk
<>< <>< <>< <>< <>< <>< <><

The University of St Andrews is a charity registered in Scotland : No SC013532


Quoting Joe King <joeking1809 at yahoo.com>:
------------------------------------------------------------------
University of St Andrews Webmail: https://webmail.st-andrews.ac.uk