Calculating the p-value testing whether a particular region has unusual prevalence compared to the overall mean using leave-one-out crossvalidation. This means that the overall mean is computed leaving out the data from the region being tested. if a population dataset is supplied, Fisher's exact test is used to calculate the p-value. If no population data is supplied, as null hypothesis Poisson distributed number of cases per region is assumed.
1 | unusual_prevalence_region(data, pops, region.head, region.i)
|
data |
a dataframe containing the number of cases and total population for all regions in the dataset. |
pops |
dataframe containing the region ID in the first and the population size for each region in the dataset in the second column. |
region.head |
variable name of the incidence column in data. |
region.i |
ID of the region being tested. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.