Learn R Programming

graphPAF (version 2.0.0)

Estimating and Displaying Population Attributable Fractions

Description

Estimation and display of various types of population attributable fraction and impact fractions. As well as the usual calculations of attributable fractions and impact fractions, functions are provided for attributable fraction nomograms and fan plots, continuous exposures, for pathway specific population attributable fractions, and for joint, average and sequential population attributable fractions.

Copy Link

Version

Install

install.packages('graphPAF')

Monthly Downloads

284

Version

2.0.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John Ferguson

Last Published

December 21st, 2023

Functions in graphPAF (2.0.0)

do_sim

Internal: Simulate a column from the post intervention distribution corresponding to eliminating a risk factor
graphPAF

Estimating and Displaying Population Attributable Fractions
print.PAF_q

Print out PAF_q for differing risk factors
print.SAF_summary

Print out a SAF_summary object
Hordaland_data

Simulated case control dataset for 5000 cases (individuals with chronic cough) and 5000 controls
PAF_calc_continuous

Calculation of attributable fractions with a continuous exposure
predict_df_continuous

Internal: Create a data frame for predictions (when risk factor is continuous).
predict_df_discrete

Internal: Create a data frame for predictions (when risk factor is discrete).
PAF_calc_discrete

Calculation of attributable fractions using a categorized risk factor
automatic_fit

Automatic fitting of probability models in a pre-specified Bayesian network.
plot.PAF_q

Plot impact fractions corresponding to risk-quantiles over several risk factors
plot.SAF_summary

Produce plots of sequential and average PAF
paf_levin

Implementation of Levin's formula for summary data
if_bruzzi

Internal: Calculation of an impact fraction using the Bruzzi approach
if_direct

Internal: Calculation of an impact fraction using the direct approach
impact_fraction

General calculations of impact fractions
joint_paf

Calculation of joint attributable fractions over several risk factors taking into account risk factor sequencing
paf_miettinen

Implementation of Miettinen's formula for summary data
rf_summary

Create a rf.data.frame object
stroke_reduced

Simulated case control dataset for 6856 stroke cases and 6856 stroke controls
risk_quantiles

Return the vector of risk quantiles for a continuous risk factor.
seq_paf

Calculation of sequential PAF taking into account risk factor sequencing
average_paf

Calculation of average and sequential paf taking into account risk factor sequencing
sim_outnode

Internal: Simulate from the post intervention distribution corresponding to eliminating a risk factor
data_clean

Clean a dataset to make model fitting more efficient
plot.rf.data.frame

Create a fan_plot of a rf.data.frame object
plot_continuous

Plot hazard ratios, odds ratios or risk ratios comparing differing values of a continuous exposure to a reference level
ps_paf

Estimate pathway specific population attributable fractions
pspaf_discrete

Internal, pathway specific PAF when the mediator is discrete