rafalab / excessmort

R package for estimating excess deaths from daily count data
20 stars 3 forks source link

Covariates #6

Open schneiderpy opened 3 months ago

schneiderpy commented 3 months ago

Is there a way to include covariates such as temperature?

rafalab commented 3 months ago

The R package does not provide a straight forward way of adding temperature. But, in principle, you can add temperature to the model for the expected counts $\mu_t$ (see page page of the Acosta and Irizarry paper). For example you can redefine it to be

$$ \mu_t = Nt \exp [ \alpha(t) + s(t) + w(t) + \beta{temp} temp(t) ] $$

The rest of the model method should work the same. You could consider more complicated relationships than linear.

We are currently working on a project where we will have to incorporate temperature, but the code won't be ready for months.

schneiderpy commented 3 months ago

Thank you Rafael for your quick reply.