Learn R Programming

riskdiff

The riskdiff package provides robust methods for calculating risk differences (also known as prevalence differences in cross-sectional studies) using generalized linear models with automatic link function selection and boundary detection.

✨ Now Available on CRAN!

riskdiff v0.2.1 is now published on CRAN with cutting-edge boundary detection capabilities that identify when maximum likelihood estimates lie at the edge of the parameter space - a common issue with identity link models that other packages ignore.

Features

  • **

Copy Link

Version

Install

install.packages('riskdiff')

Monthly Downloads

230

Version

0.3.0

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

John D. Murphy

Last Published

February 26th, 2026

Functions in riskdiff (0.3.0)

calc_risk_diff_iptw

Calculate Standardized Risk Differences Using IPTW
create_rd_table

Create Formatted Table of Risk Difference Results
create_forest_plot

Create Forest Plot for Risk Difference Results
.detect_separation

Detect Complete or Quasi-Separation
print.nnt_result

Print Method for NNT Results
.assess_result_quality

Assess Quality of Risk Difference Results
calc_iptw_weights

Calculate Propensity Scores and IPTW Weights
get_valid_boundary_types

Get Valid Boundary Types
get_quality_legend

Get Quality Legend for Risk Difference Results
summary.riskdiff_iptw_result

Summary Method for IPTW Risk Difference Results
print.riskdiff_iptw_result

Print Method for IPTW Risk Difference Results
format_risk_diff

Format Risk Difference Results for Display
.transform_iptw_to_nnt

Transform IPTW Risk Difference Results to Number Needed to Treat
.transform_to_nnt

Transform Risk Difference Results to Number Needed to Treat
cachar_sample

Synthetic Cancer Risk Factor Study Data
.detect_boundary

Detect Parameter Space Boundary Issues
create_simple_table

Create a Simple Summary Table
print.iptw_result

Print Method for IPTW Results
create_summary_table

Create Summary Table for Risk Difference Results
print.nnt_iptw_result

Print Method for IPTW NNT Results
riskdiff-package

riskdiff: Risk Difference Estimation with Multiple Link Functions and Inverse Probability of Treatment Weighting
print.riskdiff_result

Print method for riskdiff_result objects
check_iptw_assumptions

Check IPTW Assumptions
create_balance_plots

Create Balance Plots for IPTW Analysis
calc_risk_diff

Calculate Risk Differences with Robust Model Fitting and Boundary Detection