{
  "_id": "6a212ba2cd65a98ecbd234c8",
  "Package": "halfmoon",
  "Title": "Techniques to Build Better Balance",
  "Version": "0.2.0.9000",
  "Authors@R": "person(\"Malcolm\", \"Barrett\", , \"malcolmbarrett@gmail.com\", role = c(\"aut\", \"cre\", \"cph\"),\ncomment = c(ORCID = \"0000-0003-0299-5825\"))",
  "Description": "Build better balance in causal inference models.\n'halfmoon' helps you assess propensity score models for balance\nbetween groups using metrics like standardized mean differences\nand visualization techniques like mirrored histograms.\n'halfmoon' supports both weighting and matching techniques.",
  "License": "MIT + file LICENSE",
  "URL": "https://github.com/r-causal/halfmoon,\nhttps://r-causal.github.io/halfmoon/",
  "BugReports": "https://github.com/r-causal/halfmoon/issues",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "Config/pak/sysreqs": "cmake make libicu-dev libuv1-dev libxml2-dev\nlibssl-dev libnode-dev",
  "Repository": "https://r-causal.r-universe.dev",
  "Date/Publication": "2026-03-06 16:37:19 UTC",
  "RemoteUrl": "https://github.com/r-causal/halfmoon",
  "RemoteRef": "HEAD",
  "RemoteSha": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-04 07:34:19 UTC",
    "User": "root"
  },
  "Author": "Malcolm Barrett [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0003-0299-5825>)",
  "Maintainer": "Malcolm Barrett <malcolmbarrett@gmail.com>",
  "MD5sum": "94b4237f76312e375006139846901655",
  "_user": "r-causal",
  "_type": "src",
  "_file": "halfmoon_0.2.0.9000.tar.gz",
  "_fileid": "c81de9362537b2d8d0021cc62bd82ae9169f5472354c7a2f2802cb8d816a4244",
  "_filesize": 2110759,
  "_sha256": "c81de9362537b2d8d0021cc62bd82ae9169f5472354c7a2f2802cb8d816a4244",
  "_created": "2026-06-04T07:34:19.000Z",
  "_published": "2026-06-04T07:39:14.823Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79471388628,
      "time": 239,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7405672056"
    },
    {
      "job": 79471388641,
      "time": 250,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405675493"
    },
    {
      "job": 79471388561,
      "time": 176,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7405653076"
    },
    {
      "job": 79471388604,
      "time": 217,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405665166"
    },
    {
      "job": 79470867566,
      "time": 211,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405598219"
    },
    {
      "job": 79471388571,
      "time": 138,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405641620"
    },
    {
      "job": 79471388652,
      "time": 211,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7405663187"
    },
    {
      "job": 79471388596,
      "time": 220,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7405665972"
    },
    {
      "job": 79471388622,
      "time": 188,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405656234"
    }
  ],
  "_buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/r-causal/halfmoon",
  "_commit": {
    "id": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
    "author": "Malcolm Barrett <malcolmbarrett@gmail.com>",
    "committer": "Malcolm Barrett <malcolmbarrett@gmail.com>",
    "message": "dispatch\n",
    "time": 1772815039
  },
  "_maintainer": {
    "name": "Malcolm Barrett",
    "email": "malcolmbarrett@gmail.com",
    "login": "malcolmbarrett",
    "mastodon": "@malcolmbarrett@mstdn.jp",
    "bluesky": "@malcolmbarrett.malco.io",
    "orcid": "0000-0003-0299-5825",
    "description": "Open-source data science. Ph.D. in Epidemiology",
    "uuid": 23123711
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.1.0",
      "role": "Depends"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "gtsummary",
      "version": ">= 2.1.0",
      "role": "Imports"
    },
    {
      "package": "propensity",
      "role": "Imports"
    },
    {
      "package": "purrr",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "scales",
      "role": "Imports"
    },
    {
      "package": "smd",
      "role": "Imports"
    },
    {
      "package": "tibble",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "tidyselect",
      "role": "Imports"
    },
    {
      "package": "tidysmd",
      "role": "Imports"
    },
    {
      "package": "vctrs",
      "role": "Imports"
    },
    {
      "package": "cards",
      "role": "Suggests"
    },
    {
      "package": "cardx",
      "version": ">= 0.2.3",
      "role": "Suggests"
    },
    {
      "package": "cobalt",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "mgcv",
      "role": "Suggests"
    },
    {
      "package": "survey",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "vdiffr",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "r-causal",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2025-29",
      "n": 2
    },
    {
      "week": "2025-30",
      "n": 11
    },
    {
      "week": "2025-31",
      "n": 10
    },
    {
      "week": "2025-32",
      "n": 6
    },
    {
      "week": "2025-33",
      "n": 2
    },
    {
      "week": "2025-45",
      "n": 1
    },
    {
      "week": "2026-10",
      "n": 5
    }
  ],
  "_tags": [
    {
      "name": "v0.2.0",
      "date": "2026-03-04"
    }
  ],
  "_stars": 22,
  "_contributors": [
    {
      "user": "malcolmbarrett",
      "count": 300,
      "uuid": 23123711
    },
    {
      "user": "ddsjoberg",
      "count": 11,
      "uuid": 26774684
    },
    {
      "user": "copilot",
      "count": 11,
      "uuid": 198982749
    }
  ],
  "_userbio": {
    "uuid": 129535100,
    "type": "organization",
    "name": "Causal Inference in R",
    "description": "Tools and educational material for causal inference in R"
  },
  "_downloads": {
    "count": 682,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/halfmoon"
  },
  "_devurl": "https://github.com/r-causal/halfmoon",
  "_pkgdown": "https://r-causal.github.io/halfmoon/",
  "_searchresults": 91,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/halfmoon.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/r-causal/halfmoon",
  "_realowner": "r-causal",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2023-05-30"
    },
    {
      "version": "0.2.0",
      "date": "2026-03-04"
    }
  ],
  "_exports": [
    "add_ess_header",
    "bal_corr",
    "bal_energy",
    "bal_ess",
    "bal_ks",
    "bal_model_auc",
    "bal_model_roc_curve",
    "bal_prognostic_score",
    "bal_qq",
    "bal_smd",
    "bal_vr",
    "bind_matches",
    "check_balance",
    "check_ess",
    "check_model_auc",
    "check_model_calibration",
    "check_model_roc_curve",
    "check_qq",
    "contains",
    "ends_with",
    "ess",
    "everything",
    "geom_calibration",
    "geom_ecdf",
    "geom_love",
    "geom_mirror_density",
    "geom_mirror_histogram",
    "geom_qq2",
    "geom_roc",
    "last_col",
    "love_plot",
    "matches",
    "num_range",
    "one_of",
    "peek_vars",
    "plot_balance",
    "plot_ess",
    "plot_mirror_distributions",
    "plot_model_auc",
    "plot_model_calibration",
    "plot_model_roc_curve",
    "plot_qq",
    "plot_stratified_residuals",
    "starts_with",
    "stat_qq2",
    "stat_roc",
    "StatQq2",
    "StatRoc",
    "tidy_smd",
    "weighted_quantile"
  ],
  "_datasets": [
    {
      "name": "nhefs_weights",
      "title": "NHEFS with various propensity score weights",
      "object": "nhefs_weights",
      "class": [
        "tbl_df",
        "tbl",
        "data.frame"
      ],
      "fields": [
        "qsmk",
        "alcoholfreq",
        "alcoholfreq_cat",
        "race",
        "age",
        "sex",
        "education",
        "smokeintensity",
        "smokeyrs",
        "exercise",
        "active",
        "wt71",
        "wt82_71",
        "death",
        "wts",
        "w_ate",
        "w_att",
        "w_atc",
        "w_atm",
        "w_ato",
        "w_cat_ate",
        "w_cat_att_none",
        "w_cat_att_lt12",
        "w_cat_att_1_4mo",
        "w_cat_att_2_3wk",
        "w_cat_att_daily",
        "w_cat_atu_none",
        "w_cat_ato",
        "w_cat_atm",
        ".fitted"
      ],
      "rows": 1566,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "add_ess_header",
      "title": "Add ESS Table Header",
      "topics": [
        "add_ess_header"
      ]
    },
    {
      "page": "autoplot-halfmoon",
      "title": "Autoplot Methods for halfmoon Objects",
      "topics": [
        "autoplot-halfmoon",
        "autoplot.halfmoon_auc",
        "autoplot.halfmoon_balance",
        "autoplot.halfmoon_calibration",
        "autoplot.halfmoon_ess",
        "autoplot.halfmoon_qq",
        "autoplot.halfmoon_roc"
      ]
    },
    {
      "page": "bal_corr",
      "title": "Balance Weighted or Unweighted Pearson Correlation",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_corr"
      ]
    },
    {
      "page": "bal_energy",
      "title": "Balance Energy Distance",
      "topics": [
        "bal_energy"
      ]
    },
    {
      "page": "bal_ess",
      "title": "Calculate Effective Sample Size for Single Weight Vector",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_ess"
      ]
    },
    {
      "page": "bal_ks",
      "title": "Balance Kolmogorov-Smirnov (KS) Statistic for Two Groups",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_ks"
      ]
    },
    {
      "page": "bal_model_auc",
      "title": "Calculate Single AUC for Model Balance Assessment",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_model_auc"
      ]
    },
    {
      "page": "bal_model_roc_curve",
      "title": "Calculate Single ROC Curve for Model Balance Assessment",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_model_roc_curve"
      ]
    },
    {
      "page": "bal_prognostic_score",
      "title": "Compute Prognostic Scores for Balance Assessment",
      "concept": [
        "balance"
      ],
      "topics": [
        "bal_prognostic_score"
      ]
    },
    {
      "page": "bal_qq",
      "title": "Compute QQ Data for Single Variable and Weight",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_qq"
      ]
    },
    {
      "page": "bal_smd",
      "title": "Balance Standardized Mean Difference (SMD)",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_smd"
      ]
    },
    {
      "page": "bal_vr",
      "title": "Balance Variance Ratio for Two Groups",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "bal_vr"
      ]
    },
    {
      "page": "check_balance",
      "title": "Check Balance Across Multiple Metrics",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "check_balance"
      ]
    },
    {
      "page": "check_ess",
      "title": "Check Effective Sample Size",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "check_ess"
      ]
    },
    {
      "page": "check_model_auc",
      "title": "Check Balance Using Weighted ROC Curves",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "check_model_auc"
      ]
    },
    {
      "page": "check_model_calibration",
      "title": "Compute calibration data for binary outcomes",
      "topics": [
        "check_model_calibration"
      ]
    },
    {
      "page": "check_model_roc_curve",
      "title": "Check ROC Curves for Multiple Weights",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "check_model_roc_curve"
      ]
    },
    {
      "page": "check_qq",
      "title": "Check QQ Data for Multiple Weights",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "check_qq"
      ]
    },
    {
      "page": "ess",
      "title": "Calculate the Effective Sample Size (ESS)",
      "topics": [
        "ess"
      ]
    },
    {
      "page": "geom_calibration",
      "title": "Geom for calibration plot with confidence intervals",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_calibration"
      ]
    },
    {
      "page": "geom_ecdf",
      "title": "Calculate weighted and unweighted empirical cumulative distributions",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_ecdf"
      ]
    },
    {
      "page": "geom_mirror_density",
      "title": "Create mirrored density plots",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_mirror_density"
      ]
    },
    {
      "page": "geom_mirror_histogram",
      "title": "Create mirrored histograms",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_mirror_histogram"
      ]
    },
    {
      "page": "geom_qq2",
      "title": "Create 2-dimensional QQ geometries",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_qq2"
      ]
    },
    {
      "page": "geom_roc",
      "title": "ROC Curve Geom for Causal Inference",
      "concept": [
        "ggplot2 functions"
      ],
      "topics": [
        "geom_roc"
      ]
    },
    {
      "page": "nhefs_weights",
      "title": "NHEFS with various propensity score weights",
      "topics": [
        "nhefs_weights"
      ]
    },
    {
      "page": "plot_balance",
      "title": "Create balance plot from check_balance output",
      "concept": [
        "balance functions"
      ],
      "topics": [
        "plot_balance"
      ]
    },
    {
      "page": "plot_ess",
      "title": "Plot Effective Sample Size",
      "topics": [
        "plot_ess"
      ]
    },
    {
      "page": "plot_mirror_distributions",
      "title": "Create mirror distribution plots",
      "topics": [
        "plot_mirror_distributions"
      ]
    },
    {
      "page": "plot_model_auc",
      "title": "Plot ROC AUC Values for Balance Assessment",
      "topics": [
        "plot_model_auc"
      ]
    },
    {
      "page": "plot_model_calibration",
      "title": "Create calibration plot",
      "topics": [
        "plot_model_calibration",
        "plot_model_calibration.data.frame",
        "plot_model_calibration.glm",
        "plot_model_calibration.halfmoon_calibration",
        "plot_model_calibration.lm"
      ]
    },
    {
      "page": "plot_model_roc_curve",
      "title": "Plot weighted ROC Curves for Balance Assessment",
      "topics": [
        "plot_model_roc_curve"
      ]
    },
    {
      "page": "plot_qq",
      "title": "Create QQ plots for weighted and unweighted samples",
      "topics": [
        "plot_qq",
        "plot_qq.default",
        "plot_qq.halfmoon_qq"
      ]
    },
    {
      "page": "plot_stratified_residuals",
      "title": "Create stratified residual diagnostic plots",
      "topics": [
        "plot_stratified_residuals",
        "plot_stratified_residuals.data.frame",
        "plot_stratified_residuals.glm",
        "plot_stratified_residuals.lm"
      ]
    },
    {
      "page": "plot-halfmoon",
      "title": "Plot Methods for halfmoon Objects",
      "topics": [
        "plot-halfmoon",
        "plot.halfmoon_auc",
        "plot.halfmoon_balance",
        "plot.halfmoon_calibration",
        "plot.halfmoon_ess",
        "plot.halfmoon_qq",
        "plot.halfmoon_roc"
      ]
    },
    {
      "page": "stat_qq2",
      "title": "QQ2 Plot Stat",
      "topics": [
        "StatQq2",
        "stat_qq2"
      ]
    },
    {
      "page": "stat_roc",
      "title": "ROC Curve Stat",
      "topics": [
        "StatRoc",
        "stat_roc"
      ]
    },
    {
      "page": "weighted_quantile",
      "title": "Compute weighted quantiles",
      "topics": [
        "weighted_quantile"
      ]
    }
  ],
  "_pkglogo": "https://github.com/r-causal/halfmoon/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/r-causal/halfmoon/raw/HEAD/README.md",
  "_rundeps": [
    "base64enc",
    "bigD",
    "bitops",
    "bslib",
    "cachem",
    "cards",
    "cardx",
    "cli",
    "commonmark",
    "cpp11",
    "curl",
    "digest",
    "dplyr",
    "evaluate",
    "farver",
    "fastmap",
    "fontawesome",
    "fs",
    "generics",
    "ggplot2",
    "glue",
    "gt",
    "gtable",
    "gtsummary",
    "highr",
    "htmltools",
    "htmlwidgets",
    "isoband",
    "jquerylib",
    "jsonlite",
    "juicyjuice",
    "knitr",
    "labeling",
    "lifecycle",
    "litedown",
    "magrittr",
    "markdown",
    "MASS",
    "memoise",
    "mime",
    "pillar",
    "pkgconfig",
    "propensity",
    "purrr",
    "R6",
    "rappdirs",
    "RColorBrewer",
    "Rcpp",
    "reactable",
    "reactR",
    "rlang",
    "rmarkdown",
    "S7",
    "sass",
    "scales",
    "smd",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "tidysmd",
    "tinytex",
    "utf8",
    "V8",
    "vctrs",
    "viridisLite",
    "withr",
    "xfun",
    "xml2",
    "yaml"
  ],
  "_score": 6.1465621131575565,
  "_indexed": true,
  "_nocasepkg": "halfmoon",
  "_universes": [
    "r-causal",
    "malcolmbarrett"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:36:50.000Z",
      "distro": "noble",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "b0c8daebf184cbffe3994d4466ae5335481fe4a9366c74a0c27efb57054aa4ed",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:37:00.000Z",
      "distro": "noble",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "c36d90b105acf178f44fbe0a972261e715e98671a1259b6ded230c1ec81b098b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:36:15.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "849218af4521ea8236dd272c2b29fa7d50baf0e66810ba357b9526c139a17d71",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:36:38.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "4d76c83cff8743adf2ba566febba31582b7eafbb98fb7643d1891aa1f9e57eab",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:37:00.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "4540df68109816519ececefb11e0711c6d0c91e41f0b6c395181092effd67908",
      "status": "success",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:35:53.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "557f7d9757ceb2da8f43dfb7b901f1e3b1daba26e53cab95c77596015d270f94",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:36:03.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "f1e5b4284b8a9b7d816f907ea8ad8ae85ff1dbda7e83858211b6790e88aeb1fb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.2.0.9000",
      "date": "2026-06-04T07:35:43.000Z",
      "commit": "9b511fe8a26f50ef6b6b76fb44eba5ba46e21b45",
      "fileid": "b62632833465181485775576483367b9f239fec9d6d33d61e5b216684d47b6e1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/26937550496"
    }
  ]
}