irates | R Documentation |
Function computes disease incidence rates and variance-error terms by region, and writes the result into a text file (.out) that is stored in './input' folder. As input you should provide a dataframe with disease cases, population size and cartesian coordinates by region. Columns should include the following data: id of region, x, y and z cartesian coordinates at regions mass center, number of disease cases and population size by region.
irates(
dfobj = NA,
oid = NA,
xx = NA,
yy = NA,
zz = NA,
cases = NA,
pop = NA,
casesNA = 2,
day = NA,
perhab = 10^5
)
dfobj |
string, dataframe name with disease data |
oid |
character, fieldname for region id |
xx |
character, fieldname for x-coordinates |
yy |
character, fieldname for y-coordinates |
zz |
character, fieldname for z-coordinates |
cases |
character, fieldname for number of cases |
pop |
character, fieldname for population size |
casesNA, |
numeric, an integer used to replace rows with cases = NA |
day |
character, string indicating the date (format 'yyyymmdd') of disease cases |
perhab |
numeric, an integer indicating how much the rate is multiplied for, to express the disease rate (e.g 10000 or 100000) |
The function also writes and stores a text file (.out). This file contains x, y, z and incidence rate by row (region) using GeoEAS file format.
The following list of objects:
rates |
dataframe; results containing id region, x,y,z coordinates, incidence rate, variance-error term and population by region |
mrisk |
numeric; estimated global risk (/'perhab') |
file |
list characters; indicating the day of data collection, filename and root folder where text file is stored |
ssdpars |
list numeric; list of values to be passed to 'ssdpars()' |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.