This is a function that takes a "success" and a "total" variable (often something like "number of devices staying home" and "total number of devices") and shrinks them to the full data set using shrinkage methods for proportions.

hb_shrink(success, total)

## Arguments

success

A numeric integer variable containing the number of successes.

total

A numeric integer variable containing the total sample size.

## Details

This is usually called by group, either with dplyr::group_by or with the by argument in a data.table, so that individual observations can be shrunk to the group level.

## Examples

if (FALSE) {
# The directory distdat is the folder we have downloaded the distancing data to from AWS.
# Read and compile all distancing data from May 1 to May 7