{
  "_id": "6ac2cd0bd743750d376d96c7",
  "Package": "balancing",
  "Title": "Optimization-Based Balancing Weights for Causal Inference",
  "Version": "0.0.0.9000",
  "Authors@R": "c(\nperson(\"Malcolm\", \"Barrett\", , \"malcolmbarrett@gmail.com\", role = c(\"aut\", \"cre\", \"cph\"),\ncomment = c(ORCID = \"0000-0003-0299-5825\")),\nperson(\"The authors of the vendored Rust crates\", role = \"cph\",\ncomment = \"see src/rust/Cargo.lock and the bundled crate sources for the full list\")\n)",
  "Description": "Calculates optimization-based balancing weights for causal\ninference, including entropy balancing, inverse probability\ntilting, the covariate balancing propensity score, energy\nbalancing, characteristic function distance balancing, and\nstable balancing weights. Weights target covariate balance\ndirectly by solving a convex optimization problem, with support\nfor binary, categorical, and continuous exposures across a\nrange of causal estimands. A Rust core provides the numerical\nsolvers.",
  "License": "MIT + file LICENSE",
  "URL": "https://r-causal.github.io/balancing/,\nhttps://github.com/r-causal/balancing",
  "BugReports": "https://github.com/r-causal/balancing/issues",
  "VignetteBuilder": "knitr",
  "Remotes": [
    "r-causal/causalgenerics",
    "r-causal/deli",
    "r-causal/propensity"
  ],
  "Config/roxygen2/version": "8.1.0",
  "Config/testthat/edition": "3",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "Roxygen": "list(markdown = TRUE)",
  "SystemRequirements": "Cargo (Rust's package manager), rustc (>= 1.88),\nGNU make, xz, cmake",
  "Config/pak/sysreqs": "cmake make xz-utils libclang-dev",
  "Repository": "https://r-causal.r-universe.dev",
  "Date/Publication": "2026-10-04 21:34:28 UTC",
  "RemoteUrl": "https://github.com/r-causal/balancing",
  "RemoteRef": "HEAD",
  "RemoteSha": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
  "NeedsCompilation": "yes",
  "Packaged": {
    "Date": "2026-10-04 21:47:07 UTC",
    "User": "root"
  },
  "Author": "Malcolm Barrett [aut, cre, cph] (ORCID:\n<https://orcid.org/0000-0003-0299-5825>),\nThe authors of the vendored Rust crates [cph] (see src/rust/Cargo.lock\nand the bundled crate sources for the full list)",
  "Maintainer": "Malcolm Barrett <malcolmbarrett@gmail.com>",
  "_user": "r-causal",
  "_type": "src",
  "_file": "balancing_0.0.0.9000.tar.gz",
  "_fileid": "https://r2.ropensci.org/abefd62af7f0954cc904fa6ca6e48b133d448888653c4edf317b4a1e4e73b638",
  "_filesize": 1075410,
  "_sha256": "abefd62af7f0954cc904fa6ca6e48b133d448888653c4edf317b4a1e4e73b638",
  "_expires": "2027-01-12T22:02:49.000Z",
  "_created": "2026-10-04T21:47:07.000Z",
  "_published": "2026-10-04T22:02:51.148Z",
  "_jobs": [
    {
      "job": 111539758107,
      "time": 315,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11316397335"
    },
    {
      "job": 111539758078,
      "time": 351,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11315988791"
    },
    {
      "job": 111539758092,
      "time": 297,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11316197780"
    },
    {
      "job": 111539758138,
      "time": 317,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11315504207"
    },
    {
      "job": 111539758067,
      "time": 355,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11315504612"
    },
    {
      "job": 111539758075,
      "time": 470,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11316268396"
    },
    {
      "job": 111539758137,
      "time": 437,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11315823703"
    },
    {
      "job": 111539758084,
      "time": 469,
      "config": "macos-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11315728996"
    },
    {
      "job": 111538219906,
      "time": 492,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11316376811"
    },
    {
      "job": 111539757985,
      "time": 249,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11316412281"
    },
    {
      "job": 111539758156,
      "time": 559,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11315992885"
    },
    {
      "job": 111539758087,
      "time": 483,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11316063689"
    },
    {
      "job": 111539758372,
      "time": 428,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11315758550"
    },
    {
      "job": 111539758073,
      "time": 528,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11316108552"
    },
    {
      "job": 111539758128,
      "time": 426,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11316262931"
    }
  ],
  "_host": "GitHub-Actions",
  "_buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792",
  "_status": "success",
  "_upstream": "https://github.com/r-causal/balancing",
  "_commit": {
    "id": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
    "author": "Malcolm Barrett <malcolmbarrett@gmail.com>",
    "committer": "Malcolm Barrett <malcolmbarrett@gmail.com>",
    "message": "Merge branch 'add-package-logo' into HEAD\n",
    "time": 1791149668
  },
  "_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
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.3",
      "role": "Depends"
    },
    {
      "package": "causalgenerics",
      "version": ">= 0.1.0.9000",
      "role": "Imports"
    },
    {
      "package": "cli",
      "role": "Imports"
    },
    {
      "package": "deli",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "S7",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "tidyselect",
      "version": ">= 1.2.0",
      "role": "Imports"
    },
    {
      "package": "vctrs",
      "role": "Imports"
    },
    {
      "package": "halfmoon",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "MASS",
      "role": "Suggests"
    },
    {
      "package": "mice",
      "role": "Suggests"
    },
    {
      "package": "optweight",
      "role": "Suggests"
    },
    {
      "package": "osqp",
      "role": "Suggests"
    },
    {
      "package": "pkgload",
      "role": "Suggests"
    },
    {
      "package": "propensity",
      "version": ">= 0.1.0.9000",
      "role": "Suggests"
    },
    {
      "package": "quadprog",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "WeightIt",
      "role": "Suggests"
    },
    {
      "package": "withr",
      "role": "Suggests"
    }
  ],
  "_owner": "r-causal",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-28",
      "n": 8
    },
    {
      "week": "2026-29",
      "n": 14
    },
    {
      "week": "2026-30",
      "n": 19
    },
    {
      "week": "2026-31",
      "n": 99
    },
    {
      "week": "2026-32",
      "n": 10
    },
    {
      "week": "2026-33",
      "n": 2
    },
    {
      "week": "2026-35",
      "n": 2
    },
    {
      "week": "2026-36",
      "n": 1
    },
    {
      "week": "2026-40",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 3,
  "_contributors": [
    {
      "user": "malcolmbarrett",
      "count": 337,
      "uuid": 23123711
    }
  ],
  "_userbio": {
    "uuid": 129535100,
    "type": "organization",
    "name": "Causal Inference in R",
    "followers": 176,
    "description": "Tools and educational material for causal inference in R"
  },
  "_downloads": {
    "count": 0,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/balancing"
  },
  "_devurl": "https://github.com/r-causal/balancing",
  "_pkgdown": "https://r-causal.github.io/balancing/",
  "_searchresults": 20,
  "_cargo": true,
  "_topics": [
    "rust",
    "cargo"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/balancing.html",
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_cranurl": false,
  "_exports": [
    "as_bw",
    "as_conditional",
    "as_marginal",
    "balance",
    "balance_method",
    "balance_terms",
    "balancing",
    "balancing_estimating_equations",
    "build_constraint_matrix",
    "bw",
    "bw_cbps",
    "bw_cfd",
    "bw_energy",
    "bw_entropy",
    "bw_ipt",
    "bw_sbw",
    "estimand",
    "estimating_equation_method",
    "estimating_equations",
    "fit_method",
    "ipw",
    "is_bw",
    "is_causal_wt",
    "method_label",
    "new_bw",
    "pool_ipw",
    "quadratic_program_method",
    "rebuild_constraint_matrix",
    "supported_estimands",
    "supported_exposure_types",
    "supports_estimating_equations"
  ],
  "_help": [
    {
      "page": "balance",
      "title": "Estimate balancing weights",
      "topics": [
        "balance"
      ]
    },
    {
      "page": "balance_method",
      "title": "The balancing method specification classes",
      "topics": [
        "balance_method",
        "estimating_equation_method",
        "quadratic_program_method"
      ]
    },
    {
      "page": "balance_terms",
      "title": "Balance constraints",
      "topics": [
        "balance_terms"
      ]
    },
    {
      "page": "balancing",
      "title": "A fitted balancing result",
      "topics": [
        "balancing"
      ]
    },
    {
      "page": "balancing_options",
      "title": "Package options",
      "topics": [
        "balancing_options"
      ]
    },
    {
      "page": "bw",
      "title": "Balancing weight vectors",
      "topics": [
        "as_bw",
        "bw",
        "is_bw",
        "new_bw"
      ]
    },
    {
      "page": "bw_cbps",
      "title": "Covariate balancing propensity score",
      "topics": [
        "bw_cbps"
      ]
    },
    {
      "page": "bw_cfd",
      "title": "Characteristic function distance balancing",
      "topics": [
        "bw_cfd"
      ]
    },
    {
      "page": "bw_energy",
      "title": "Energy balancing",
      "topics": [
        "bw_energy"
      ]
    },
    {
      "page": "bw_entropy",
      "title": "Entropy balancing",
      "topics": [
        "bw_entropy"
      ]
    },
    {
      "page": "bw_ipt",
      "title": "Inverse probability tilting",
      "topics": [
        "bw_ipt"
      ]
    },
    {
      "page": "bw_sbw",
      "title": "Stable balancing weights",
      "topics": [
        "bw_sbw"
      ]
    },
    {
      "page": "estimating_equations",
      "title": "Extract the estimating-equations container",
      "topics": [
        "estimating_equations"
      ]
    },
    {
      "page": "ipw.balancing",
      "title": "Inverse probability weighting for a balancing fit",
      "topics": [
        "ipw.balancing"
      ]
    },
    {
      "page": "weights-balancing-balancing-method",
      "title": "Extract balancing weights",
      "topics": [
        "weights,balancing::balancing-method"
      ]
    }
  ],
  "_pkglogo": "https://github.com/r-causal/balancing/raw/HEAD/man/figures/logo.png",
  "_readme": "https://github.com/r-causal/balancing/raw/HEAD/README.md",
  "_rundeps": [
    "causalgenerics",
    "cli",
    "deli",
    "generics",
    "glue",
    "lifecycle",
    "rlang",
    "rootSolve",
    "S7",
    "tidyselect",
    "vctrs",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "choosing-a-method.Rmd",
      "filename": "choosing-a-method.html",
      "title": "Choosing a balancing method",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Two families of methods",
        "Which exposures and estimands each method supports",
        "Exact versus tolerance-based balance",
        "Constraints in depth",
        "Continuous exposures",
        "A note on solvers"
      ],
      "created": "2026-07-14 22:10:38",
      "modified": "2026-08-31 15:04:23",
      "commits": 8
    },
    {
      "source": "balancing.Rmd",
      "filename": "balancing.html",
      "title": "Get started with balancing",
      "engine": "knitr::rmarkdown",
      "headings": [
        "A confounded example",
        "Fitting balancing weights",
        "Checking balance with halfmoon",
        "Estimating a causal effect",
        "Standard errors with ipw()",
        "Where to go next"
      ],
      "created": "2026-07-14 22:10:38",
      "modified": "2026-08-02 15:56:10",
      "commits": 7
    },
    {
      "source": "inference.Rmd",
      "filename": "inference.html",
      "title": "Inference after balancing",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Why the weights' uncertainty matters",
        "M-estimation with ipw()",
        "Categorical exposures",
        "Effect modification with .by",
        "Joint exposures",
        "Continuous exposures",
        "Covariate-adjusted outcome models",
        "Bootstrapping the other fits",
        "Choosing an approach"
      ],
      "created": "2026-07-14 22:10:38",
      "modified": "2026-08-31 15:04:23",
      "commits": 13
    }
  ],
  "_score": 4.9084850188786495,
  "_indexed": true,
  "_nocasepkg": "balancing",
  "_universes": [
    "r-causal",
    "malcolmbarrett"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:51:01.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/83101d4a711502171a352ba921efe34ab63c4aeae13ee1e6a50e96bd8bcd05d6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:51:44.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/1844ebe1ce2169a06e78511707a0675262386a9ee457b8b71efa1aee9bbc437b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:50:52.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/c30981a0a1cd587518683cdf1c4ed2cd68bb0b609609c98c7fa43f898c17338f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:51:13.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/0f5072af59e5921b82a06d3387dc589ab0c596440b25b7121b25e7cb6f3300c9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:55:37.000Z",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/7469a5fb9e8b3be8adbe6645ba0ad18872c11b18125ce68139974fe055660c30",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:54:25.000Z",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/3de86e2b202e4e6ed6fe97c6b5e875f7534db23b13d14c19124c002de2633e5b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:56:52.000Z",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/359bc79ec20e3fd21cc3b2990c05c98bf81cfbe23f6e70677b13641d39b07977",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:56:36.000Z",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/96697f8880b6da6df46b91d2186cee51a2e1440e02acf2ea33f291c1bdc25784",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:51:28.000Z",
      "arch": "emscripten",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/06c3a187ceed61f32ec57e2993f61194cadc2b2b447c87b2bef4698e108c9116",
      "status": "success",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:52:33.000Z",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/a6f3c2f98d0298b85c46a810b07ba37922bbccc17c7b05b9724d84a20677dad6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:50:16.000Z",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/31203cfc2ea313647b26bbf6e59414a96bf3befe187d0ba9160cc5c64f0dd44e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:50:07.000Z",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/93b96eb0f3f16f1ecfc0cef957595d83aa50eafb9a95f2a2eb0bc896148d6e7a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:51:59.000Z",
      "arch": "aarch64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/eb9e06446a1736c0783fea7507fdc037fae14f2763d778318214457f8e93dce7",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.0.0.9000",
      "date": "2026-10-04T21:50:07.000Z",
      "arch": "x86_64",
      "commit": "1b40fcb2779daa83d18ad45fb316c46a6f1ff444",
      "fileid": "https://r2.ropensci.org/c56b57c8b8e9d3c79b53814963044467e3c6ec759776ea7600a49732ab61e76c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/r-causal/actions/runs/37237043792"
    }
  ]
}