项目作者: ellisvalentiner

项目描述 :
Bayesian model of COVID-19 cases in U.S. counties
高级语言:
项目地址: git://github.com/ellisvalentiner/COVID-19-County-Model.git
创建时间: 2020-11-15T16:08:47Z
项目社区:https://github.com/ellisvalentiner/COVID-19-County-Model

开源协议:

下载


COVID-19 U.S. County Model

Bayesian model of COVID-19 cases in U.S. counties.


Data

The data is from the COVID-19 Event Risk
Planner
,
which combines data from several sources including the NYTimes COVID19
data project
and U.S.
Census
.
It includes U.S. county-level COVID-19 data such as number of cases,
deaths, and population.

Stan Model

I fit a hierarchical binomial model for the counts of COVID-19 cases in
each U.S. county. The model treats each county as population members and
uses partial pooling to estimate county-level COVID-19 cases. Partial
pooling means the county-level COVID-19 probabilities are modeled by a
distribution. This allows for information sharing among these
parameters.

The Stan model is below:

  1. data {
  2. int<lower=0> N; // counties
  3. int<lower=0> y[N]; // cases
  4. int<lower=0> K[N]; // populations
  5. }
  6. parameters {
  7. real<lower=0, upper=1> phi; // population chance of covid
  8. real<lower=1> kappa; // population concentration
  9. vector<lower=0, upper=1>[N] theta; // chance of covid
  10. }
  11. model {
  12. kappa ~ pareto(1, 1.5); // hyperprior
  13. theta ~ beta(phi * kappa, (1 - phi) * kappa); // prior
  14. y ~ binomial(K, theta); // likelihood
  15. }

Results

COVID-19 Rate

Residuals