{
  "_id": "6a212ddbcd65a98ecbd24009",
  "Package": "natstrat",
  "Type": "Package",
  "Title": "Obtain Unweighted Natural Strata that Balance Many Covariates",
  "Version": "2.0.1",
  "Authors@R": "c(\nperson(\"Katherine\", \"Brumberg\", email = \"kbrum@umich.edu\",\nrole=c(\"aut\", \"cre\")))",
  "Description": "Natural strata can be used in observational studies to\nbalance the distributions of many covariates across any number\nof treatment groups and any number of comparisons. These strata\nhave proportional amounts of units within each stratum across\nthe treatments, allowing for simple interpretation and\naggregation across strata. Within each stratum, the units are\nchosen using randomized rounding of a linear program that\nbalances many covariates. For more details, see Brumberg et al.\n(2022) <doi:10.1111/rssa.12848> and Brumberg et al.(2023)\n<doi:10.1093/jrsssc/qlad010>. To solve the linear program, the\n'Gurobi' commercial optimization software is recommended, but\nnot required. The 'gurobi' R package can be installed by\nfollowing the instructions at\n<https://docs.gurobi.com/projects/optimizer/en/current/reference/r/setup.html>\nafter claiming your free academic license at\n<https://www.gurobi.com/academia/academic-program-and-licenses/>.",
  "URL": "https://github.com/kkbrum/natstrat,\nhttps://kkbrum.github.io/natstrat/,\nhttps://docs.gurobi.com/projects/optimizer/en/current/reference/r/setup.html",
  "BugReports": "https://github.com/kkbrum/natstrat/issues",
  "License": "GPL-3",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.3.1",
  "VignetteBuilder": "knitr",
  "Config/testthat/edition": "3",
  "Config/pak/sysreqs": "libglpk-dev libicu-dev",
  "Repository": "https://kkbrum.r-universe.dev",
  "Date/Publication": "2026-02-03 21:51:55 UTC",
  "RemoteUrl": "https://github.com/kkbrum/natstrat",
  "RemoteRef": "HEAD",
  "RemoteSha": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-06-04 07:44:42 UTC",
    "User": "root"
  },
  "Author": "Katherine Brumberg [aut, cre]",
  "Maintainer": "Katherine Brumberg <kbrum@umich.edu>",
  "MD5sum": "7e91cc559c141d6ca85a4ec46797a357",
  "_user": "kkbrum",
  "_type": "src",
  "_file": "natstrat_2.0.1.tar.gz",
  "_fileid": "de4f760114a23afb74d7c2ceeaa9b69f5e276fc26f42dfaca983679159765d71",
  "_filesize": 1221838,
  "_sha256": "de4f760114a23afb74d7c2ceeaa9b69f5e276fc26f42dfaca983679159765d71",
  "_created": "2026-06-04T07:44:42.000Z",
  "_published": "2026-06-04T07:48:43.931Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79472938031,
      "time": 193,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7405859654"
    },
    {
      "job": 79472938035,
      "time": 197,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405860801"
    },
    {
      "job": 79472938152,
      "time": 144,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7405843831"
    },
    {
      "job": 79472938103,
      "time": 119,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405835409"
    },
    {
      "job": 79472420521,
      "time": 203,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405795595"
    },
    {
      "job": 79472938020,
      "time": 136,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405840796"
    },
    {
      "job": 79472938105,
      "time": 141,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7405842727"
    },
    {
      "job": 79472938064,
      "time": 150,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7405845745"
    },
    {
      "job": 79472938060,
      "time": 141,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7405842542"
    }
  ],
  "_buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/kkbrum/natstrat",
  "_commit": {
    "id": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
    "author": "kkbrum <katherine.kkbrum@gmail.com>",
    "committer": "kkbrum <katherine.kkbrum@gmail.com>",
    "message": "Update cran-comments.md\n",
    "time": 1770155515
  },
  "_maintainer": {
    "name": "Katherine Brumberg",
    "email": "kbrum@umich.edu",
    "login": "kkbrum",
    "description": "",
    "uuid": 25392075
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 2.10",
      "role": "Depends"
    },
    {
      "package": "caret",
      "role": "Depends"
    },
    {
      "package": "Rglpk",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "plyr",
      "role": "Imports"
    },
    {
      "package": "pps",
      "role": "Imports"
    },
    {
      "package": "sampling",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "ramify",
      "role": "Imports"
    },
    {
      "package": "slam",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "markdown",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "DT",
      "role": "Suggests"
    },
    {
      "package": "stringr",
      "role": "Suggests"
    },
    {
      "package": "covr",
      "role": "Suggests"
    },
    {
      "package": "gurobi",
      "role": "Suggests"
    }
  ],
  "_owner": "kkbrum",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-06",
      "n": 5
    }
  ],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "kkbrum",
      "count": 30,
      "uuid": 25392075
    }
  ],
  "_userbio": {
    "uuid": 25392075,
    "type": "user",
    "name": "Katherine"
  },
  "_downloads": {
    "count": 192,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/natstrat"
  },
  "_devurl": "https://github.com/kkbrum/natstrat",
  "_pkgdown": "https://kkbrum.github.io/natstrat/",
  "_searchresults": 3,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/natstrat.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/kkbrum/natstrat",
  "_realowner": "kkbrum",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2021-05-26"
    },
    {
      "version": "2.0.0",
      "date": "2021-10-15"
    },
    {
      "version": "2.0.1",
      "date": "2026-02-03"
    }
  ],
  "_exports": [
    "check_balance",
    "create_dist_matrix",
    "generate_constraints",
    "generate_qs",
    "optimize_controls",
    "stand"
  ],
  "_datasets": [
    {
      "name": "nh0506",
      "title": "Homocysteine and smoking example data",
      "object": "nh0506",
      "class": [
        "data.frame"
      ],
      "fields": [
        "SEQN",
        "z",
        "sex",
        "age",
        "race",
        "education",
        "povertyr",
        "bmi",
        "cigsperday30",
        "cotinine",
        "homocysteine"
      ],
      "rows": 2928,
      "table": true,
      "tojson": true
    },
    {
      "name": "nh0506_3groups",
      "title": "Homocysteine and smoking example data with multiple control groups",
      "object": "nh0506_3groups",
      "class": [
        "data.frame"
      ],
      "fields": [
        "SEQN",
        "z",
        "sex",
        "age",
        "race",
        "education",
        "povertyr",
        "bmi",
        "cigsperday30",
        "cotinine",
        "homocysteine"
      ],
      "rows": 4457,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "check_balance",
      "title": "Check covariate balance of the control and treated groups",
      "topics": [
        "check_balance"
      ]
    },
    {
      "page": "create_dist_matrix",
      "title": "Create matrix of distances between strata",
      "topics": [
        "create_dist_matrix"
      ]
    },
    {
      "page": "generate_constraints",
      "title": "Generate constraints to encourage covariate balance",
      "topics": [
        "generate_constraints"
      ]
    },
    {
      "page": "generate_qs",
      "title": "Calculate desired number of controls per stratum",
      "topics": [
        "generate_qs"
      ]
    },
    {
      "page": "nh0506",
      "title": "Homocysteine and smoking example data",
      "topics": [
        "nh0506"
      ]
    },
    {
      "page": "nh0506_3groups",
      "title": "Homocysteine and smoking example data with multiple control groups",
      "topics": [
        "nh0506_3groups"
      ]
    },
    {
      "page": "optimize_controls",
      "title": "Select control units that optimize covariate balance",
      "topics": [
        "optimize_controls"
      ]
    },
    {
      "page": "stand",
      "title": "Standardize covariate vector for balance constraint",
      "topics": [
        "stand"
      ]
    }
  ],
  "_readme": "https://github.com/kkbrum/natstrat/raw/HEAD/README.md",
  "_rundeps": [
    "caret",
    "class",
    "cli",
    "clock",
    "codetools",
    "cpp11",
    "data.table",
    "diagram",
    "digest",
    "dplyr",
    "e1071",
    "farver",
    "foreach",
    "future",
    "future.apply",
    "generics",
    "ggplot2",
    "globals",
    "glue",
    "gower",
    "gtable",
    "hardhat",
    "ipred",
    "isoband",
    "iterators",
    "KernSmooth",
    "labeling",
    "lattice",
    "lava",
    "lifecycle",
    "listenv",
    "lpSolve",
    "lubridate",
    "magrittr",
    "MASS",
    "Matrix",
    "ModelMetrics",
    "nlme",
    "nnet",
    "numDeriv",
    "parallelly",
    "pillar",
    "pkgconfig",
    "plyr",
    "pps",
    "pROC",
    "prodlim",
    "progressr",
    "proxy",
    "purrr",
    "R6",
    "ramify",
    "RColorBrewer",
    "Rcpp",
    "recipes",
    "reshape2",
    "Rglpk",
    "rlang",
    "rpart",
    "S7",
    "sampling",
    "scales",
    "shape",
    "slam",
    "sparsevctrs",
    "SQUAREM",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "timechange",
    "timeDate",
    "tzdb",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "natstrat.Rmd",
      "filename": "natstrat.html",
      "title": "Introduction to natstrat",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Example: Smoking and Homocysteine Levels",
        "Creating strata",
        "Selecting a ratio of controls to treated",
        "Generating covariate balance constraints",
        "Optimizing the control group",
        "Checking balance achieved",
        "Outcome analysis",
        "Further details",
        "Deviating from proportionality",
        "Multiple comparisons",
        "Balance formula syntax",
        "Additional generate_constraints() arguments",
        "Additional optimize_controls() arguments"
      ],
      "created": "2021-05-14 16:23:35",
      "modified": "2021-10-15 14:20:45",
      "commits": 4
    }
  ],
  "_score": 3.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "natstrat",
  "_universes": [
    "kkbrum"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-06-04T07:47:22.000Z",
      "distro": "noble",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "9f015b303988661fde3e7ad807caada4367ba53a779a80cc09bddd78e8025e08",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.0.1",
      "date": "2026-06-04T07:47:26.000Z",
      "distro": "noble",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "0c8d280002e11f0f830e923753f3fc0abbea7a17004d7a4b268ee5a7f05a29e9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-06-04T07:46:36.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "949f68a544e274ff903f1f7ddc863c0aa59451158cf9760052151e0e39f2efb5",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.0.1",
      "date": "2026-06-04T07:46:27.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "91534817ad92e9a31d43ff76713a75a75950c6e2f236cccf57609b9ab584d5af",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.1",
      "date": "2026-06-04T07:47:21.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "290698e14d1e89d597e07964a1fd8a7ef70c4e37c938caeebf39edf4b63a339e",
      "status": "success",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-06-04T07:46:12.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "806c9ba63b12dbed331667463a4c6b884e48523cebfcfcf05b39e107d4bb149e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-06-04T07:46:27.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "1576d55da82fefe9422bbeb4f020d57d1471cd50c651a7ffe24d8a8ca905f98a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.0.1",
      "date": "2026-06-04T07:46:12.000Z",
      "commit": "8abe4aca76dbccb79a2480f07e629f2e499c7169",
      "fileid": "c474436c6d487dfcefd511572033f88a7a6dd72240c5b748cc53c06c11edcdc1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/kkbrum/actions/runs/26938023752"
    }
  ]
}