vaweeklytests: Weekly VDH COVID-19 testing data by health district

Description Usage Format Details Source

Description

VDH testing and positive case fraction reports aggregated to weekly resolution and adjusted for overdispersion.

Usage

1

Format

Data frame with 10 columns

HealthDistrict

VDH health district.

week

Week number

date

Date of the last day of the week with recorded measurements.

ntest

Number of reported tests for the week.

npos

Number of reported cases for the week.

varpos

Variance in the daily positive test fraction.

nday

Number of days reported in the week.

neff

Effective number of samples (see details).

nposeff

Effective number of positive samples.

Details

Test counts and reports are aggregated by week, with weeks running Monday through Sunday (they are defined this way so that a Monday morning update has data for a full week). The date assigned is the date of the last day (Sunday) of the week. The positive test fraction is calculated as the number of positive tests for the week divided by the total number of tests for the week.

To adjust for overdispersion we also calculate the daily positive test fraction and its variance over the 7 days in the week. The effective number of samples is calculated as p*(1-p)/sig2, where p is the weekly positive test fraction. Loosely speaking, what we're doing here is assuming that the sample prevalence is constant over a week and taking the variance of the daily measurements as an estimate of the variance in the measurement procedure. Then we set the effective number of tests such that the variance of the posterior PDF of the p inferred from those observations will be equal to the observed variance. From this, the effective number of positive results is estimated by multiplying neff by fpos. Both neff and nposeff are rounded to the nearest integer (meaning that nposeff/neff may not be precisely equal fpos).

Finally, note that this procedure is performed only when the number of observations for the week is greater than 32 and there are at least 4 days of observations in the week. Weeks that don't meet these standards in a district are left unadjusted. This prevents us from getting crazy results for partial weeks or weeks with just a few observations. We also force neff <= ntest (so far only one week in one district has required adjustment in this respect).

Source

Virginia Department of Health https://www.vdh.virginia.gov/coronavirus/


rplzzz/vdhcovid documentation built on July 2, 2021, 7:43 a.m.