{
  "_id": "6a1eb822b25058d4daade966",
  "Package": "riskdiff",
  "Title": "Risk Difference Estimation with Multiple Link Functions and\nInverse Probability of Treatment Weighting",
  "Version": "0.3.0",
  "Date": "2026-02-26",
  "Authors@R": "person(\"John D.\", \"Murphy\", , \"jackdmurphy@protonmail.com\", role = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-7714-9976\", \"MPH, PhD\"))",
  "Description": "Calculates risk differences (or prevalence differences for\ncross-sectional data) and Number Needed to Treat (NNT) using\ngeneralized linear models with automatic link function\nselection. Provides robust model fitting with fallback methods,\nsupport for stratification and adjustment variables, inverse\nprobability of treatment weighting (IPTW) for causal inference\nwith NNT calculations, and publication-ready output formatting.\nHandles model convergence issues gracefully and provides\nconfidence intervals using multiple approaches. Methods are\nbased on approaches described in Mark W. Donoghoe and Ian C.\nMarschner (2018) \"logbin: An R Package for Relative Risk\nRegression Using the Log-Binomial Model\"\n<doi:10.18637/jss.v086.i09> for robust GLM fitting, Peter C.\nAustin (2011) \"An Introduction to Propensity Score Methods for\nReducing the Effects of Confounding in Observational Studies\"\n<doi:10.1080/00273171.2011.568786> for IPTW methods, and\nstandard epidemiological methods for risk difference estimation\nas described in Kenneth J. Rothman, Sander Greenland and\nTimothy L. Lash (2008, ISBN:9780781755641) \"Modern\nEpidemiology\".",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/testthat/edition": "3",
  "URL": "https://github.com/jackmurphy2351/riskdiff",
  "BugReports": "https://github.com/jackmurphy2351/riskdiff/issues",
  "LazyData": "true",
  "VignetteBuilder": "knitr",
  "Config/pak/sysreqs": "libicu-dev",
  "Repository": "https://jackmurphy2351.r-universe.dev",
  "Date/Publication": "2026-03-03 18:01:16 UTC",
  "RemoteUrl": "https://github.com/jackmurphy2351/riskdiff",
  "RemoteRef": "HEAD",
  "RemoteSha": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-02 10:51:22 UTC",
    "User": "root"
  },
  "Author": "John D. Murphy [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-7714-9976>, MPH, PhD)",
  "Maintainer": "John D. Murphy <jackdmurphy@protonmail.com>",
  "MD5sum": "f32986fc56d08b9de7a0c8e55167b1da",
  "_user": "jackmurphy2351",
  "_type": "src",
  "_file": "riskdiff_0.3.0.tar.gz",
  "_fileid": "9247430461fc7173dfd42a81fa027e25bffc6e6e5d3ce21ff1da82c9d6f1c693",
  "_filesize": 781506,
  "_sha256": "9247430461fc7173dfd42a81fa027e25bffc6e6e5d3ce21ff1da82c9d6f1c693",
  "_created": "2026-06-02T10:51:22.000Z",
  "_published": "2026-06-02T11:01:54.829Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79054437345,
      "time": 172,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7355744349"
    },
    {
      "job": 79054437257,
      "time": 169,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7355743822"
    },
    {
      "job": 79054437370,
      "time": 155,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7355847300"
    },
    {
      "job": 79054437308,
      "time": 154,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7355859149"
    },
    {
      "job": 79053873277,
      "time": 207,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7355684984"
    },
    {
      "job": 79054437261,
      "time": 106,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7355720777"
    },
    {
      "job": 79054437421,
      "time": 112,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7355723222"
    },
    {
      "job": 79054437311,
      "time": 153,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7355737500"
    },
    {
      "job": 79054437385,
      "time": 116,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7355724197"
    }
  ],
  "_buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/jackmurphy2351/riskdiff",
  "_commit": {
    "id": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
    "author": "Jack Murphy <120122776+jackmurphy2351@users.noreply.github.com>",
    "committer": "GitHub <noreply@github.com>",
    "message": "Update version from 0.2.1 to 0.3.0 in README",
    "time": 1772560876
  },
  "_maintainer": {
    "name": "John D. Murphy",
    "email": "jackdmurphy@protonmail.com",
    "login": "jackmurphy2351",
    "orcid": "0000-0002-7714-9976",
    "description": "Epidemiologist and biostatistician with interests in global health, health and climate change, health behaviour, and cancer prevention.",
    "uuid": 120122776
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "dplyr",
      "version": ">= 1.0.0",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "scales",
      "role": "Imports"
    },
    {
      "package": "stringr",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "kableExtra",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "mockery",
      "role": "Suggests"
    }
  ],
  "_owner": "jackmurphy2351",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-25",
      "n": 2
    },
    {
      "week": "2025-26",
      "n": 2
    },
    {
      "week": "2025-27",
      "n": 3
    },
    {
      "week": "2025-40",
      "n": 3
    },
    {
      "week": "2026-09",
      "n": 13
    },
    {
      "week": "2026-10",
      "n": 2
    }
  ],
  "_tags": [
    {
      "name": "v0.2.0",
      "date": "2025-06-22"
    },
    {
      "name": "v0.2.1",
      "date": "2025-06-25"
    },
    {
      "name": "v0.3.0",
      "date": "2025-07-04"
    }
  ],
  "_topics": [
    "biostatistics",
    "epidemiology",
    "public-health"
  ],
  "_stars": 2,
  "_contributors": [
    {
      "user": "jackmurphy2351",
      "count": 46,
      "uuid": 120122776
    }
  ],
  "_userbio": {
    "uuid": 120122776,
    "type": "user",
    "name": "Jack Murphy",
    "description": "Epidemiologist and biostatistician with interests in global health, health and climate change, health behaviour, and cancer prevention."
  },
  "_downloads": {
    "count": 155,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/riskdiff"
  },
  "_devurl": "https://github.com/jackmurphy2351/riskdiff",
  "_searchresults": 12,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "extra/riskdiff.html",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/jackmurphy2351/riskdiff",
  "_realowner": "jackmurphy2351",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2025-06-03"
    },
    {
      "version": "0.2.0",
      "date": "2025-06-23"
    },
    {
      "version": "0.2.1",
      "date": "2025-06-30"
    },
    {
      "version": "0.3.0",
      "date": "2026-02-26"
    }
  ],
  "_exports": [
    "calc_iptw_weights",
    "calc_risk_diff",
    "calc_risk_diff_iptw",
    "check_iptw_assumptions",
    "create_balance_plots",
    "create_forest_plot",
    "create_rd_table",
    "create_simple_table",
    "create_summary_table",
    "format_risk_diff",
    "get_quality_legend",
    "get_valid_boundary_types"
  ],
  "_datasets": [
    {
      "name": "cachar_sample",
      "title": "Synthetic Cancer Risk Factor Study Data",
      "object": "cachar_sample",
      "class": [
        "data.frame"
      ],
      "fields": [
        "id",
        "age",
        "sex",
        "residence",
        "smoking",
        "tobacco_chewing",
        "areca_nut",
        "alcohol",
        "abnormal_screen",
        "head_neck_abnormal",
        "age_group",
        "tobacco_areca_both"
      ],
      "rows": 2500,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "cachar_sample",
      "title": "Synthetic Cancer Risk Factor Study Data",
      "topics": [
        "cachar_sample"
      ]
    },
    {
      "page": "calc_iptw_weights",
      "title": "Calculate Propensity Scores and IPTW Weights",
      "topics": [
        "calc_iptw_weights"
      ]
    },
    {
      "page": "calc_risk_diff",
      "title": "Calculate Risk Differences with Robust Model Fitting and Boundary Detection",
      "topics": [
        "calc_risk_diff"
      ]
    },
    {
      "page": "calc_risk_diff_iptw",
      "title": "Calculate Standardized Risk Differences Using IPTW",
      "topics": [
        "calc_risk_diff_iptw"
      ]
    },
    {
      "page": "check_iptw_assumptions",
      "title": "Check IPTW Assumptions",
      "topics": [
        "check_iptw_assumptions"
      ]
    },
    {
      "page": "create_balance_plots",
      "title": "Create Balance Plots for IPTW Analysis",
      "topics": [
        "create_balance_plots"
      ]
    },
    {
      "page": "create_forest_plot",
      "title": "Create Forest Plot for Risk Difference Results",
      "topics": [
        "create_forest_plot"
      ]
    },
    {
      "page": "create_rd_table",
      "title": "Create Formatted Table of Risk Difference Results",
      "topics": [
        "create_rd_table"
      ]
    },
    {
      "page": "create_simple_table",
      "title": "Create a Simple Summary Table",
      "topics": [
        "create_simple_table"
      ]
    },
    {
      "page": "create_summary_table",
      "title": "Create Summary Table for Risk Difference Results",
      "topics": [
        "create_summary_table"
      ]
    },
    {
      "page": "format_risk_diff",
      "title": "Format Risk Difference Results for Display",
      "topics": [
        "format_risk_diff"
      ]
    },
    {
      "page": "get_quality_legend",
      "title": "Get Quality Legend for Risk Difference Results",
      "topics": [
        "get_quality_legend"
      ]
    },
    {
      "page": "get_valid_boundary_types",
      "title": "Get Valid Boundary Types",
      "topics": [
        "get_valid_boundary_types"
      ]
    },
    {
      "page": "print.iptw_result",
      "title": "Print Method for IPTW Results",
      "topics": [
        "print.iptw_result"
      ]
    },
    {
      "page": "print.nnt_iptw_result",
      "title": "Print Method for IPTW NNT Results",
      "topics": [
        "print.nnt_iptw_result"
      ]
    },
    {
      "page": "print.nnt_result",
      "title": "Print Method for NNT Results",
      "topics": [
        "print.nnt_result"
      ]
    },
    {
      "page": "print.riskdiff_iptw_result",
      "title": "Print Method for IPTW Risk Difference Results",
      "topics": [
        "print.riskdiff_iptw_result"
      ]
    },
    {
      "page": "print.riskdiff_result",
      "title": "Print method for riskdiff_result objects",
      "topics": [
        "print.riskdiff_result"
      ]
    },
    {
      "page": "summary.riskdiff_iptw_result",
      "title": "Summary Method for IPTW Risk Difference Results",
      "topics": [
        "summary.riskdiff_iptw_result"
      ]
    }
  ],
  "_pkglogo": "https://github.com/jackmurphy2351/riskdiff/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/jackmurphy2351/riskdiff/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cpp11",
    "dplyr",
    "farver",
    "generics",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "magrittr",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "stringi",
    "stringr",
    "tibble",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "iptw-analysis.Rmd",
      "filename": "iptw-analysis.html",
      "title": "Causal Inference with IPTW in riskdiff",
      "author": "John D. Murphy",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "When to Use IPTW",
        "Key Assumptions",
        "Basic IPTW Analysis",
        "Step 1: Calculate IPTW Weights",
        "Step 2: Check IPTW Assumptions",
        "Step 3: Visualize Balance",
        "Step 4: Estimate Causal Risk Difference",
        "Different Types of Causal Effects",
        "Average Treatment Effect (ATE)",
        "Average Treatment Effect on the Treated (ATT)",
        "Average Treatment Effect on the Controls (ATC)",
        "Causal Number Needed to Treat",
        "NNT for Different Causal Estimands",
        "Advanced Options",
        "Bootstrap Confidence Intervals",
        "Different Propensity Score Models",
        "Weight Stabilization and Trimming",
        "Troubleshooting Common Issues",
        "Poor Balance",
        "Extreme Propensity Scores",
        "Model Specification",
        "Sensitivity Analysis",
        "Best Practices",
        "Reporting IPTW Results",
        "Conclusion",
        "References"
      ],
      "created": "2025-06-22 21:16:34",
      "modified": "2025-09-30 19:36:27",
      "commits": 2
    },
    {
      "source": "complete-example.Rmd",
      "filename": "complete-example.html",
      "title": "complete-example",
      "engine": "knitr::rmarkdown",
      "headings": [],
      "created": "2025-06-22 21:16:34",
      "modified": "2025-06-22 21:16:34",
      "commits": 1
    },
    {
      "source": "riskdiff-intro.Rmd",
      "filename": "riskdiff-intro.html",
      "title": "Getting Started with Risk Differences",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Why Risk Differences Matter in Public Health",
        "Understanding the Example Data",
        "Your First Risk Difference Analysis",
        "Understanding the Output",
        "Interpreting Risk Differences",
        "Adjusted Analyses",
        "Stratified Analysis",
        "Visualizing Your Results",
        "Number Needed to Treat (NNT)",
        "Common Pitfalls and Solutions",
        "1. Model Convergence Issues",
        "2. Very Rare Outcomes",
        "3. Missing Data",
        "Quick Reference",
        "Basic Syntax",
        "Interpretation Guide",
        "When to Use Risk Differences",
        "Next Steps",
        "Getting Help"
      ],
      "created": "2025-06-22 21:16:34",
      "modified": "2025-09-30 19:36:27",
      "commits": 5
    },
    {
      "source": "technical-details.Rmd",
      "filename": "technical-details.html",
      "title": "technical-details",
      "engine": "knitr::rmarkdown",
      "headings": [],
      "created": "2025-06-22 21:16:34",
      "modified": "2025-06-22 21:16:34",
      "commits": 1
    }
  ],
  "_score": 5.4593924877592315,
  "_indexed": true,
  "_nocasepkg": "riskdiff",
  "_universes": [
    "jackmurphy2351"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.3.0",
      "date": "2026-06-02T10:53:41.000Z",
      "distro": "noble",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "ca65e6cfed8e60c7c31a9de362f7da7ffb75d440404261e9c390d8fe1df56f50",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.3.0",
      "date": "2026-06-02T10:53:39.000Z",
      "distro": "noble",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "02aed84a8c338c542752c57ee3c5044473d97777894146d994a4f9f86df9430a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.3.0",
      "date": "2026-06-02T10:59:13.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "74c2bb7e2573133dd9f4860bdbb61f922985da0fdf0e9f0d429997e1229b2d48",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.3.0",
      "date": "2026-06-02T10:59:49.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "df55fe9385c3ae4f01119dd4cad354cec95b7ad98f0a4820b6958fec4839cdf8",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.3.0",
      "date": "2026-06-02T10:53:26.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "c32b91b0bb8b023ab849f4c98126d8213440ed57b2b11d6f1af85e276da28c77",
      "status": "success",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.3.0",
      "date": "2026-06-02T10:52:30.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "f6a3bd00f32b6f45d62afaea01a68d2a2142c6b30d25ef1b44795974a84d5aed",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.3.0",
      "date": "2026-06-02T10:53:00.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "f9114b8eba55528721db6ba49c7042fee3b9d6b1d6ec3dcc2084b0b605909d13",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.3.0",
      "date": "2026-06-02T10:52:35.000Z",
      "commit": "e229bdce163d8a09cec0359afeaea474cbb0e21b",
      "fileid": "2a317efd0266257d2ef9a5b432e4f3afc490ae2a537fdde403b824412b438a41",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/jackmurphy2351/actions/runs/26814820911"
    }
  ]
}