crude_rates: Crude Prevalence Calculator

Description Usage Arguments Value Examples

Description

Crude Prevalence Calculator

Usage

1
crude_rates(df, Condition, ...)

Arguments

df

a tidy dataframe in standard Master Patient Index format ie SangerTools::PopHealthData

Condition

A Health condition flag denoted by 1 & 0

...

Grouping variables ie Locality; use at least 1, when multiple seperate by comma

Value

a tibble Rates Per 1,000 calculated

Examples

1
2
3
4
5
6
7
library(SangerTools)
library(dplyr)
health_data <- SangerTools::PopHealthData
glimpse(health_data)
# Generate crude prevalene rate stats
crude_prevalence <- SangerTools::crude_rates(health_data,Diabetes,Locality)
print(crude_prevalence)

ald0405/SangerTools documentation built on Jan. 14, 2022, 9:42 p.m.