calc_beta: Estimates beta from a given R0

Description Usage Arguments Details Value Examples

Description

Estimates beta for an epidemic with a given R0 in a specific population in a spatial dataset, and calculates the expanded kernel matrix (expanded_D) to use when simulating an epidemic.

Usage

1
calc_beta(spatial_data, dist_kernel, contact_mat, R0 = 1.8, sigma = 1/2.6)

Arguments

spatial_data

The spatial_dataset containing the population data.

dist_kernel

The distance kernel matrix.

contact_mat

The contact matrix for mixing between age groups.

R0

The desired value for R0.

sigma

The desired value for the recovery rate.

Details

This function is automatically executed when using the prep_simulation function. It uses the Next Generation Matrix approach to derive beta from R0.

Value

Returns the value of beta and assigns the expanded_D matrix to the global environment.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Create a spatial dataset:
test_data = raster(nrow=10, ncol=10, xmn=1, xmx=100000, ymn=1, ymx=100000)
values(test_data) = runif(100, 1, 1000)

#Calculate distance kernel matrix and load age mixing matrix:
dist_mat = calc_dist_mat(test_data)
dist_kernel = calc_dist_kernel(dist_mat, dist_c = 87, test_data, alpha=0.95, p=6.6, p2=1.53, aa=35)
load_contact_mat()

beta = calc_beta(test_data, dist_kernel, contact_mat, R0=1.8, sigma=1/2.6)

qleclerc/epicspatial documentation built on May 21, 2019, 4:06 a.m.