library(epiR)
## Loading required package: survival
## Package epiR 2.0.43 is loaded
## Type help(epi.about) for summary information
## Type browseVignettes(package = 'epiR') to learn how to use epiR for applied epidemiological analyses
##
Example 1. In a North American city with 6500 population, 66 citizen were recently diagnosed with Parkinson disease . What is the estimated prevalence of Parkinson disease in the city ?
ncases <- 66
npopulation <- 6500
Percount <- 1000
mydata <- as.matrix(cbind(ncases, npopulation))
mydata
## ncases npopulation
## [1,] 66 6500
Prevalence= epi.conf(mydata,
ctype = "prevalence",
method = "exact",
N = 100000,
design = 1,
conf.level = 0.95) * Percount
round(Prevalence,3)
## est lower upper
## 1 10.154 7.861 12.9
The estimated prevalence of Parkinson disease in this city is 10.15 (95% confidence interval [CI] 7.861-12.900) cases per 1000 persons at risk.
Example 2 : In the same city, a total of 66 diagnoses of Parkinson disease were made from 38458 person-years at risk. What was the incidence rate of Parkinson disease in this city?
ncases <- 66
npopulation <- 38458
Percount<-1000
mydata <- as.matrix(cbind(ncases, npopulation))
mydata
## ncases npopulation
## [1,] 66 38458
Incidence = epi.conf(mydata,
ctype = "inc.rate",
method = "exact",
N = 100000,
design = 1,
conf.level = 0.95) * Percount
round(Incidence,3)
## est lower upper
## ncases 1.716 1.327 2.183
The incidence rate of Parkinson disease in this city was 1.716 (95% CI 1.327-2.183) cases per 1000 person-years at risk.