I'm currently working with a data set that consists of a monthly case count for several sites, along with a number of site-specific covariates. We're trying to estimate the effect of one of them on the case-load (either in terms of numbers or a percent). At the moment, I've been using Peng and Dominici's Statistical Methods for Environmental Epidemiology with R as a reference for the approach I'm considering using.
For a single site, the idea is to fit a Poisson model with roughly the following form:
$$\log ({\mu _t}) = \alpha + \beta {x_t} + \eta {z_t} + f(t) + {\varepsilon _t}$$
Where mu
is the monthly case count, beta
is the log-relative increase in cases due to a one unit increase in the variable of interest, eta
is the vector of other measured covariates and f(t) is some sort of smoothed spline over time.
So far, I'm comfortable enough with this. My problem is implementing a hierarchical model that gives an estimate of the effect pulling from information from each site. Is there a particularly good way to approach this in R? A well-documented package for example? Is it sufficient to essentially treat this as a meta-analysis with each site as a "study" and use something like metafor
? And is there a way to do it while modeling a site-specific covariate? The authors seem to be pushing for the use of a Bayesian hierarchical model, but the implementation of something like that is admittedly a bit of unexplored territory for me.
glmer
from package lme4. $\endgroup$