Title: | Estimate the Burden of Healthcare-Associated Infections |
Version: | 0.99.2 |
Author: | Benedikt Zacher [aut, cre] |
Maintainer: | Benedikt Zacher <ZacherB@rki.de> |
Description: | Provides an approach which is based on the methodology of the Burden of Communicable Diseases in Europe (BCoDE) and can be used for large and small samples such as individual countries. The Burden of Healthcare-Associated Infections (BHAI) is estimated in disability-adjusted life years, number of infections as well as number of deaths per year. Results can be visualized with various plotting functions and exported into tables. |
Depends: | R (≥ 3.6.0) |
License: | GPL-3 |
LazyData: | true |
RoxygenNote: | 6.1.1 |
Imports: | prevtoinc, MCMCpack, plotrix, graphics, grDevices, stats, methods |
NeedsCompilation: | no |
Packaged: | 2019-10-01 13:58:13 UTC; zacherb |
Repository: | CRAN |
Date/Publication: | 2019-10-06 10:20:02 UTC |
BHAI:
Description
The BHAI package
BHAI functions
bhai
:
Create a PPS object
Description
This function creates a PPS object.
Usage
PPS(num_hai_patients = NULL, num_survey_patients = NULL,
length_of_stay = NULL, loi_pps = NULL, hospital_discharges = NULL,
num_hai_patients_by_stratum = NULL,
num_hai_patients_by_stratum_prior = NULL, mccabe_scores_distr = NULL,
mccabe_by_stratum_prior = NULL, mccabe_life_exp = NULL,
num_survey_patients_by_stratum = NULL, population = NULL,
country = "")
Arguments
num_hai_patients |
Named numeric containing patients having healthcare-associated infections. |
num_survey_patients |
Number of patients in point prevalence survey. |
length_of_stay |
Length of stay of all patients in hospitals. This is need for the prevalence to incidence conversion with the Rhame-Sudderth formula. |
loi_pps |
A list containing length of infections from all patients in the PPS. The length of infection of all healthcare-associated infections. In PPS this is usually approximated as the time from infection onset until the date of the survey. |
hospital_discharges |
The number of hospital discharges. |
num_hai_patients_by_stratum |
A list containing for each infection the number of patients in each age and gender stratum. |
num_hai_patients_by_stratum_prior |
The prior weight (counts) for each infection, age and gender stratum. This is used for smooting the age and gender distribution when small numbers are observed. |
mccabe_scores_distr |
The observed McCabe scores (counts) for each infection, age and gender stratum from the PPS. |
mccabe_by_stratum_prior |
The prior weight (counts) for each infection, McCabe score, age and gender stratum. This is used for smooting the age and gender distribution when small numbers are observed. |
mccabe_life_exp |
Named list containing remaining life expectancies for each McCabe score (NONFATAL, ULTFATAL, RAPFATAL). |
num_survey_patients_by_stratum |
Number of survey patients stratified by infection, age and gender. If this parameter is provided the methodology described in Cassini et al. (2016) <doi:https://doi.org/10.1371/journal.pmed.1002150> is applied. |
population |
Population size. |
country |
Name of the country. |
Value
A PPS class object.
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
This class is a generic container for PPS data sets.
Description
This class is a generic container for PPS data sets.
Slots
infections
Character vector storing names of infections in PPS
num_hai_patients
Named numeric containing patients having healthcare-associated infections.
num_survey_patients
Number of patients in point prevalence survey.
length_of_stay
Length of stay of all patients in hospitals. This is need for the prevalence to incidence conversion with the Rhame-Sudderth formula.
loi_pps
A list containing length of infections from all patients in the PPS. In PPS this is usually calculated as the time from infection onset until the date of the survey.
hospital_discharges
The number of hospital discharges.
num_hai_patients_by_stratum
A list containing for each infection the number of patients in each age and gender stratum.
num_hai_patients_by_stratum_prior
The prior weight (counts) for each infection, age and gender stratum. This is used for smooting the age and gender distribution when small numbers are observed.
mccabe_scores_distr
The observed McCabe scores (counts) for each infection, age and gender stratum from the PPS.
mccabe_by_stratum_prior
The prior weight (counts) for each infection, McCabe score, age and gender stratum. This is used for smooting the age and gender distribution when small numbers are observed.
mccabe_life_exp
Named list containing remaining life expectancies for each McCabe score (NONFATAL, ULTFATAL, RAPFATAL).
num_survey_patients_by_stratum
Number of survey patients stratified by infection, age and gender. If this parameter is provided the methodology described in Cassini et al. (2016) <doi:https://doi.org/10.1371/journal.pmed.1002150> is applied.
population
Population size
country
Name of the country in which PPS was conducted
bhai_options
Options with which bhai was run. If bhai was not run yet, this is an empty list.
bhai_summary
Summary statistics of bhai. If bhai was not run yet, this is an empty list.
Main function of the package to estimation of the burden of healthcare-associated infections
Description
Estimation of the burden of healthcare-associated infections
Usage
bhai(pps, nsim = 1000, pop.sampling = TRUE,
sample_distr = "rbetamix", estimate_loi_fun = bootstrap_mean_gren,
stratified_sampling = FALSE, summarize_strata = TRUE,
use_prior = TRUE)
## S4 method for signature 'PPS'
bhai(pps, nsim = 1000, pop.sampling = TRUE,
sample_distr = "rbetamix", estimate_loi_fun = bootstrap_mean_gren,
stratified_sampling = FALSE, summarize_strata = TRUE,
use_prior = TRUE)
Arguments
pps |
The PPS object containing the data. |
nsim |
Number of Monte Carlo simulations, default: 1000. |
pop.sampling |
Specifying whether parameters of the disease outcome trees should be sampled on population level, default: TRUE. |
sample_distr |
Distribution used for prevalence sampling, default: "rbetamix". |
estimate_loi_fun |
Function used for estimation of the length of infection, default: bootstrap_mean_gren (recommended!). |
stratified_sampling |
Specifying whether stratified sampling should be done. |
summarize_strata |
Specifying whether stratum-specific summary statistics should be computed. |
use_prior |
Specifying whether Prior distributions should be used for computations. |
Value
A PPS class object.
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
set.seed(3)
# The following example is run only for illustratory reasons
# Note that you should never run the function with only 10 Monte-Carlo simulations in practice!
bhai(german_pps_repr, nsim=10)
Barplot of cases, deaths and DALYs.
Description
Barplot of cases, deaths and DALYs.
Usage
bhai.barplot(..., what, infections=NULL, cols1=NULL, cols2=NULL, ylab=NULL, ylim=NULL,
legend_labs=NULL, main="", names.inf=TRUE, cex.names=1, border=par("fg"), lwd.errors=2)
Arguments
... |
Further plotting arguments |
what |
One of c("Cases", "Deaths", "DALY") |
infections |
If sepcified only a subset of infections in |
cols1 |
Color used to fill the bars. |
cols2 |
Specifies colors of YLDs when plotting DALYs. |
ylab |
Y-axis labels. |
ylim |
Limits of y-axis. |
legend_labs |
Labels of legend. |
main |
Title of plot |
names.inf |
Specifying whether names of infections should be plotted. |
cex.names |
Font size of labels. |
border |
The color to be used for the border of the bars, default: par("fg"). |
lwd.errors |
Line width of error bars. |
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
set.seed(3)
# The following example is run only for illustratory reasons
# Note that you should never run the function with only 10 Monte-Carlo simulations in practice!
result_ger = bhai(german_pps_repr, nsim=10)
bhai.barplot(result_ger, what="Cases")
Summary plot of number of infections, deaths and DALYs
Description
Summary plot of number of infections, deaths and DALYs
Usage
bhai.circleplot(pps, infections=NULL, main="", xlim=NULL, ylim=NULL)
Arguments
pps |
The PPS object containing the data. |
infections |
Infections to be plotted. |
main |
Title of plot. |
xlim |
Limits of x-axis. |
ylim |
Limits of y-axis. |
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
set.seed(3)
# The following example is run only for illustratory reasons
# Note that you should never run the function with only 10 Monte-Carlo simulations in practice!
result = bhai(german_pps_repr, nsim=10)
bhai.circleplot(pps=result)
Create summary table
Description
Create BHAI summary table
Usage
bhai.prettyTable(pps, pop_norm=FALSE, conf.int=TRUE)
Arguments
pps |
The PPS object containing the data. |
pop_norm |
Indicating whether statistics should be computed per 100,000 population, default: TRUE. |
conf.int |
Specifying whether confidence intervals should be computed, default: TRUE. |
Value
A data.frame containing the summarised results.
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
set.seed(3)
# The following example is run only for illustratory reasons
# Note that you should never run the function with only 10 Monte-Carlo simulations in practice!
result = bhai(german_pps_repr, nsim=10)
bhai.prettyTable(result)
Stratified barplot of cases, deaths and DALYs.
Description
Stratified barplot of cases, deaths and DALYs.
Usage
bhai.strataplot(pps, infection, what, col=NULL, errors=TRUE, lwd.errors=2, xlab=NULL, ...)
Arguments
pps |
The PPS object containing the data. |
infection |
Infection to be plotted. |
what |
One of c("Cases", "Deaths", "DALY") |
col |
Color used to fill the bars. |
errors |
Specifying whether error bars should be plotted, default: TRUE. |
lwd.errors |
Line width of error bars. |
xlab |
X-axis labels. |
... |
Further plotting arguments |
See Also
Examples
data(german_pps_2011_repr)
german_pps_repr = PPS(num_hai_patients = num_hai_patients,
num_hai_patients_by_stratum = num_hai_patients_by_stratum,
num_hai_patients_by_stratum_prior = num_hai_patients_by_stratum_prior,
num_survey_patients = num_survey_patients,
length_of_stay = length_of_stay,
loi_pps = loi_pps,
mccabe_scores_distr = mccabe_scores_distr,
mccabe_life_exp = mccabe_life_exp,
hospital_discharges = hospital_discharges,
population = population,
country="Germany (representative sample)")
german_pps_repr
set.seed(3)
# The following example is run only for illustratory reasons
# Note that you should never run the function with only 10 Monte-Carlo simulations in practice!
result = bhai(german_pps_repr, nsim=10)
bhai.strataplot(pps=result, infection="HAP", what="Cases")
Aggregated data of the ECDC PPS 2010-2011.
Description
Aggregated data of the ECDC PPS 2010-2011.
Usage
data(eu_pps_2011)
Format
A PPS object.
Aggregated data of the german PPS 2010-2011 (convenience sample).
Description
Aggregated data of the german PPS 2010-2011 (convenience sample).
Usage
data(german_pps_2011_conv)
Format
A PPS object.
Hospital discharges in Germany (2011)
Description
Hospital discharges in Germany (2011)
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Average length of stay of survey patients in german PPS 2011 (representative sample)
Description
Average length of stay of survey patients in german PPS 2011 (representative sample)
Usage
data(german_pps_2011_repr)
Format
A PPS object.
A list containing length of infections from all patients in the german PPS 2011 representative sample.
Description
A list containing length of infections from all patients in the german PPS 2011 representative sample.
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Named list containing remaining life expectancies for each McCabe score (NONFATAL, ULTFATAL, RAPFATAL).
Description
Named list containing remaining life expectancies for each McCabe score (NONFATAL, ULTFATAL, RAPFATAL).
Usage
data(german_pps_2011_repr)
Format
A PPS object.
The observed McCabe scores (counts) for each infection, age and gender stratum from the ECDC PPS 2011-2012.
Description
The observed McCabe scores (counts) for each infection, age and gender stratum from the ECDC PPS 2011-2012.
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Number of cases for each infection in the german PPS 2011 (representative sample)
Description
Number of cases for each infection in the german PPS 2011 (representative sample)
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Stratified number of cases for each infection in the german PPS 2011 (representative sample)
Description
Stratified number of cases for each infection in the german PPS 2011 (representative sample)
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Stratified number of cases for each infection in the german PPS 2011 (convenience sample). This distribution is used as a Prior for the representative sample.
Description
Stratified number of cases for each infection in the german PPS 2011 (convenience sample). This distribution is used as a Prior for the representative sample.
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Number of survey patients in the german PPS 2011 (representative sample).
Description
Number of survey patients in the german PPS 2011 (representative sample).
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Population size of Germany in 2011.
Description
Population size of Germany in 2011.
Usage
data(german_pps_2011_repr)
Format
A PPS object.
Simulate PPS data
Description
Simulate PPS data
Usage
sample.pps(pps_data, num_survey_patients)
Arguments
pps_data |
The PPS object containing the data. Parameters for simulations are extracted from this data. |
num_survey_patients |
Numeric vector indicating sample sizes for simulations. |
Value
A simulated PPS object.
See Also
Examples
# Specify the number of survey patients
sim_survey_patients = 10000
# Subsample data sets from european PPS
sim_pps = sample.pps(eu_pps, num_survey_patients = sim_survey_patients)
Simulated/subsampled data sets from european PPS
Description
Simulated/subsampled data sets from european PPS
Usage
data(simulations)
Format
A PPS object.
BHAI with default options was applied to simulated/subsampled data sets from european PPS
Description
BHAI with default options was applied to simulated/subsampled data sets from european PPS
Usage
data(simulations)
Format
A PPS object.
BHAI with prior was applied to simulated/subsampled data sets from european PPS
Description
BHAI with prior was applied to simulated/subsampled data sets from european PPS
Usage
data(simulations)
Format
A PPS object.
BHAI with stratified sampling was applied to simulated/subsampled data sets from european PPS
Description
BHAI with stratified sampling was applied to simulated/subsampled data sets from european PPS
Usage
data(simulations)
Format
A PPS object.