{
  "_id": "6a1043a7acfb0bcc41c9dfd8",
  "Package": "nncc",
  "Title": "Nearest Neighbors Matching of Case-Control Data",
  "Version": "2.0.0",
  "Authors@R": "c(person(\"Beau\", \"Bruce\", email = \"lue7@cdc.gov\", role = c(\"aut\", \"cre\")),\nperson(\"Zhaohui\", \"Cui\", email = \"nyv5@cdc.gov\", role = c(\"aut\"))\n)",
  "Description": "Provides nearest-neighbors matching and analysis of\ncase-control data. Cui, Z., Marder, E. P., Click, E. S.,\nHoekstra, R. M., & Bruce, B. B. (2022)\n<doi:10.1097/EDE.0000000000001504>.",
  "License": "GPL (>= 3)",
  "Encoding": "UTF-8",
  "LazyData": "true",
  "RoxygenNote": "7.2.3",
  "VignetteBuilder": "knitr",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-11 06:53:10 UTC",
    "User": "root"
  },
  "Author": "Beau Bruce [aut, cre], Zhaohui Cui [aut]",
  "Maintainer": "Beau Bruce <lue7@cdc.gov>",
  "Config/pak/sysreqs": "libglpk-dev libicu-dev libxml2-dev",
  "Repository": "https://bbbruce.r-universe.dev",
  "Date/Publication": "2024-01-12 02:41:42 UTC",
  "RemoteUrl": "https://github.com/cran/nncc",
  "RemoteRef": "HEAD",
  "RemoteSha": "51eede2692303149526096c4f5ef9125202bd4f7",
  "MD5sum": "2e2cb94e06f3b0b7c841423956aaf85a",
  "_user": "bbbruce",
  "_type": "src",
  "_file": "nncc_2.0.0.tar.gz",
  "_fileid": "4df0a23fbd3b9b63b583f6f88f15c003d8a0264024071f85bad126e83ed0b4a8",
  "_filesize": 364927,
  "_sha256": "4df0a23fbd3b9b63b583f6f88f15c003d8a0264024071f85bad126e83ed0b4a8",
  "_created": "2026-05-11T06:53:10.000Z",
  "_published": "2026-05-22T11:53:11.807Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77374044386,
      "time": 161,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6912066839"
    },
    {
      "job": 77374044289,
      "time": 150,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6912065777"
    },
    {
      "job": 77374044472,
      "time": 141,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6912060039"
    },
    {
      "job": 77374044325,
      "time": 142,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6912056454"
    },
    {
      "job": 77374044339,
      "time": 256,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6912027269"
    },
    {
      "job": 77374043893,
      "time": 125,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7159830394"
    },
    {
      "job": 77374045000,
      "time": 97,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6912051148"
    },
    {
      "job": 77374044618,
      "time": 95,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6912050899"
    },
    {
      "job": 77374044613,
      "time": 109,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6912054555"
    }
  ],
  "_buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/nncc",
  "_commit": {
    "id": "51eede2692303149526096c4f5ef9125202bd4f7",
    "author": "Beau Bruce <lue7@cdc.gov>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 2.0.0\n",
    "time": 1705027302
  },
  "_maintainer": {
    "name": "Beau Bruce",
    "email": "lue7@cdc.gov",
    "login": "bbbruce",
    "uuid": 8679359
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.3.2",
      "role": "Depends"
    },
    {
      "package": "dplyr",
      "role": "Imports"
    },
    {
      "package": "furrr",
      "role": "Imports"
    },
    {
      "package": "tidyr",
      "role": "Imports"
    },
    {
      "package": "igraph",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "role": "Imports"
    },
    {
      "package": "cluster",
      "role": "Imports"
    },
    {
      "package": "rlang",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "future",
      "role": "Suggests"
    },
    {
      "package": "future.batchtools",
      "role": "Suggests"
    },
    {
      "package": "logistf",
      "role": "Suggests"
    },
    {
      "package": "mice",
      "role": "Suggests"
    },
    {
      "package": "survival",
      "role": "Suggests"
    }
  ],
  "_owner": "cran",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [],
  "_tags": [],
  "_stars": 0,
  "_contributors": [
    {
      "user": "bbbruce",
      "count": 3,
      "uuid": 8679359
    }
  ],
  "_userbio": {
    "uuid": 8679359,
    "type": "user",
    "name": "Beau Bruce"
  },
  "_downloads": {
    "count": 227,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/nncc"
  },
  "_searchresults": 3,
  "_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/nncc.html",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_realowner": "bbbruce",
  "_cranurl": false,
  "_releases": [
    {
      "version": "1.0.0",
      "date": "2022-08-30"
    },
    {
      "version": "1.0.1",
      "date": "2023-05-05"
    },
    {
      "version": "2.0.0",
      "date": "2024-01-11"
    }
  ],
  "_exports": [
    "cacheit",
    "distance_density_plot",
    "finalize_data",
    "get_paf",
    "get_threshold",
    "make_analysis_set",
    "make_knn_strata",
    "original_compare_plot",
    "plot_results",
    "test_mh",
    "threshold_model_plot",
    "unique_controls",
    "write_strata_or_output"
  ],
  "_datasets": [
    {
      "name": "anifood",
      "title": "case-control data",
      "object": "anifood",
      "class": [
        "data.frame"
      ],
      "fields": [
        "case",
        "exp01",
        "exp09",
        "exp20",
        "exp24",
        "exp27",
        "exp43",
        "exp45",
        "exp50",
        "exp52",
        "exp57"
      ],
      "rows": 500,
      "table": true,
      "tojson": true
    },
    {
      "name": "excl_vars",
      "title": "Variables excluded from matching",
      "object": "excl_vars",
      "class": [
        "data.frame"
      ],
      "fields": [
        "exp_var",
        "rm_vars"
      ],
      "rows": 3,
      "table": true,
      "tojson": true
    },
    {
      "name": "sex2",
      "title": "Urinary Tract Infection in American College Students",
      "object": "sex2",
      "class": [
        "data.frame"
      ],
      "fields": [
        "case",
        "age",
        "oc",
        "vic",
        "vicl",
        "vis",
        "dia"
      ],
      "rows": 239,
      "table": true,
      "tojson": true
    },
    {
      "name": "sexagg",
      "title": "Urinary Tract Infection in American College Students",
      "object": "sexagg",
      "class": [
        "data.frame"
      ],
      "fields": [
        "case",
        "age",
        "oc",
        "vic",
        "vicl",
        "vis",
        "dia",
        "COUNT",
        "PERCENT"
      ],
      "rows": 36,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "anifood",
      "title": "case-control data",
      "topics": [
        "anifood"
      ]
    },
    {
      "page": "cacheit",
      "title": "Function to cache long operations",
      "topics": [
        "cacheit"
      ]
    },
    {
      "page": "calc_strata_or",
      "title": "Calculate the pooled strata OR",
      "topics": [
        "calc_strata_or"
      ]
    },
    {
      "page": "distance_density_plot",
      "title": "Distance density plots comparing closest to random choices",
      "topics": [
        "distance_density_plot"
      ]
    },
    {
      "page": "excl_vars",
      "title": "Variables excluded from matching",
      "topics": [
        "excl_vars"
      ]
    },
    {
      "page": "finalize_data",
      "title": "Final cleaning of the matched dataset(s)",
      "topics": [
        "finalize_data"
      ]
    },
    {
      "page": "fix_df",
      "title": "Fix the strata so they all have at least one case and control",
      "topics": [
        "fix_df"
      ]
    },
    {
      "page": "get_paf",
      "title": "Calculate population attributable fraction using odds ratio",
      "topics": [
        "get_paf"
      ]
    },
    {
      "page": "get_threshold",
      "title": "Identify the right threshold",
      "topics": [
        "get_threshold"
      ]
    },
    {
      "page": "make_analysis_set",
      "title": "Make analysis set",
      "topics": [
        "make_analysis_set"
      ]
    },
    {
      "page": "make_analysis_sets",
      "title": "Make analysis datasets",
      "topics": [
        "make_analysis_sets"
      ]
    },
    {
      "page": "make_knn_strata",
      "title": "Make case-control strata using k nearest neighbors (knn)",
      "topics": [
        "make_knn_strata"
      ]
    },
    {
      "page": "nncc",
      "title": "nncc: nearest-neighbors matching for case-control data",
      "topics": [
        "case_control",
        "matching",
        "nearest_neighbors",
        "nncc"
      ]
    },
    {
      "page": "original_compare_plot",
      "title": "Compare the original strata's distances to the knn version",
      "topics": [
        "original_compare_plot"
      ]
    },
    {
      "page": "plot_results",
      "title": "Plot the OR results",
      "topics": [
        "plot_results"
      ]
    },
    {
      "page": "sex2",
      "title": "Urinary Tract Infection in American College Students",
      "topics": [
        "sex2"
      ]
    },
    {
      "page": "sexagg",
      "title": "Urinary Tract Infection in American College Students",
      "topics": [
        "sexagg"
      ]
    },
    {
      "page": "test_mh",
      "title": "Calculate odds ratios",
      "topics": [
        "test_mh"
      ]
    },
    {
      "page": "threshold_model_plot",
      "title": "Show the prediction of the logistic regression model",
      "topics": [
        "threshold_model_plot"
      ]
    },
    {
      "page": "unique_controls",
      "title": "Ensures controls are unique to avoid possible pseudoreplication issues",
      "topics": [
        "unique_controls"
      ]
    },
    {
      "page": "write_strata_or_output",
      "title": "Format strata output into CSV",
      "topics": [
        "write_strata_or_output"
      ]
    }
  ],
  "_readme": "https://github.com/cran/nncc/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "cluster",
    "codetools",
    "cpp11",
    "digest",
    "dplyr",
    "farver",
    "furrr",
    "future",
    "generics",
    "ggplot2",
    "globals",
    "glue",
    "gtable",
    "igraph",
    "isoband",
    "labeling",
    "lattice",
    "lifecycle",
    "listenv",
    "magrittr",
    "Matrix",
    "parallelly",
    "pillar",
    "pkgconfig",
    "purrr",
    "R6",
    "RColorBrewer",
    "rlang",
    "S7",
    "scales",
    "stringi",
    "stringr",
    "tibble",
    "tidyr",
    "tidyselect",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_vignettes": [
    {
      "source": "nncc.Rmd",
      "filename": "nncc.html",
      "title": "nncc: nearest-neighbors matching for case-control data",
      "engine": "knitr::rmarkdown",
      "headings": [
        "1. Prepare the data",
        "2. Establish a threshold for distance",
        "3. Create strata: candidate matches for final analysis",
        "4. Prepare final matched sets for analysis",
        "5. Calculate odds ratios",
        "5.1 Mantel–Haenszel test and Fisher's exact test",
        "5.2 Conditional logistic regression",
        "5.3 Penalized logistic regression",
        "6. Calculate population attributable fraction (PAF)",
        "7. Multiple imputation of missingness",
        "8. Helper function cacheit()",
        "9. Run the analysis on your local computer or HPC",
        "9.1 local computer",
        "9.2 HPC",
        "References:"
      ],
      "created": "2022-08-30 12:00:02",
      "modified": "2024-01-12 02:41:42",
      "commits": 3
    }
  ],
  "_score": 2.6989700043360187,
  "_indexed": true,
  "_nocasepkg": "nncc",
  "_universes": [
    "bbbruce"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.0",
      "date": "2026-05-11T06:55:40.000Z",
      "distro": "noble",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "6a9254938bc65adfccfce147eef89991acb9ebf33d395859aa0cc0dfc1808371",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.0.0",
      "date": "2026-05-11T06:55:38.000Z",
      "distro": "noble",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "184329c65eb4b07ea237c706317b1842ab12d472ac18df74e13042a4507a45ad",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.0",
      "date": "2026-05-11T06:55:25.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "6e88871702def4f25b09afaaf7fbea51f8739e903d4eec63f87064670df25814",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.0.0",
      "date": "2026-05-11T06:55:08.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "b7698831259bb3591a35fd31135f0f644b15e4ac827895c1e0d847672eca989c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-05-11T06:54:35.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "3bc0e58441098de58d6956e145d6faa2d7f9d782ab66887843c62d4915518c0a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-05-11T06:54:32.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "33ec941d0d9bf00296b3803d39f351223db936099197c866316cd795c6298513",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.0.0",
      "date": "2026-05-11T06:54:48.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "9e526ce4111cca700f43cd2e17b81da71115d8263c01c9cbe630cb9e0d54e7b4",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.0",
      "date": "2026-05-22T11:52:56.000Z",
      "commit": "51eede2692303149526096c4f5ef9125202bd4f7",
      "fileid": "a5630e460303f588168c35cbf96a13e8a34ff813562f48c9d861b9c9a602b6c3",
      "status": "success",
      "buildurl": "https://github.com/r-universe/bbbruce/actions/runs/25654826590"
    }
  ]
}