{
  "_id": "6a10267aacfb0bcc41c8f7a5",
  "Package": "cv",
  "Type": "Package",
  "Title": "Cross-Validating Regression Models",
  "Version": "2.0.4",
  "Date": "2025-06-16",
  "Authors@R": "c(person(\"John\", \"Fox\", role = \"aut\", email = \"jfox@mcmaster.ca\",\ncomment = c(ORCID = \"0000-0002-1196-8012\")),\nperson(\"Georges\", \"Monette\", role = c(\"aut\", \"cre\"), email = \"georges+cv@yorku.ca\"))",
  "Description": "Cross-validation methods of regression models that exploit\nfeatures of various modeling functions to improve speed. Some\nof the methods implemented in the package are novel, as\ndescribed in the package vignettes; for general introductions\nto cross-validation, see, for example, Gareth James, Daniela\nWitten, Trevor Hastie, and Robert Tibshirani (2021, ISBN\n978-1-0716-1417-4, Secs. 5.1, 5.3), \"An Introduction to\nStatistical Learning with Applications in R, Second Edition\",\nand Trevor Hastie, Robert Tibshirani, and Jerome Friedman\n(2009, ISBN 978-0-387-84857-0, Sec. 7.10), \"The Elements of\nStatistical Learning, Second Edition\".",
  "LazyData": "TRUE",
  "VignetteBuilder": "knitr, rmarkdown",
  "License": "GPL (>= 2)",
  "Encoding": "UTF-8",
  "Language": "en-US",
  "Roxygen": "list(markdown = TRUE)",
  "RoxygenNote": "7.3.3",
  "URL": "https://gmonette.github.io/cv/,\nhttps://CRAN.R-project.org/package=cv",
  "BugReports": "https://github.com/gmonette/cv/issues",
  "Config/pak/sysreqs": "cmake make libicu-dev",
  "Repository": "https://gmonette.r-universe.dev",
  "Date/Publication": "2025-09-24 21:52:34 UTC",
  "RemoteUrl": "https://github.com/gmonette/cv",
  "RemoteRef": "HEAD",
  "RemoteSha": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
  "NeedsCompilation": "no",
  "Packaged": {
    "Date": "2026-05-13 09:03:56 UTC",
    "User": "root"
  },
  "Author": "John Fox [aut] (ORCID: <https://orcid.org/0000-0002-1196-8012>),\nGeorges Monette [aut, cre]",
  "Maintainer": "Georges Monette <georges+cv@yorku.ca>",
  "MD5sum": "c40650828149d1547b6dc00c34666cb1",
  "_user": "gmonette",
  "_type": "src",
  "_file": "cv_2.0.4.tar.gz",
  "_fileid": "b202175001b5477f4ddbbe1d4d5305eb8de33662b949eac4a21d2418692c606d",
  "_filesize": 5347575,
  "_sha256": "b202175001b5477f4ddbbe1d4d5305eb8de33662b949eac4a21d2418692c606d",
  "_created": "2026-05-13T09:03:56.000Z",
  "_published": "2026-05-22T09:48:42.857Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77355724539,
      "time": 191,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6965947555"
    },
    {
      "job": 77355724559,
      "time": 187,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965943371"
    },
    {
      "job": 77355724573,
      "time": 228,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6965945497"
    },
    {
      "job": 77355724599,
      "time": 142,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965921572"
    },
    {
      "job": 77355723776,
      "time": 475,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965877486"
    },
    {
      "job": 77355723640,
      "time": 142,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7157634445"
    },
    {
      "job": 77355724029,
      "time": 154,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "6965933674"
    },
    {
      "job": 77355724437,
      "time": 123,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "6965921222"
    },
    {
      "job": 77355724328,
      "time": 140,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "6965926852"
    }
  ],
  "_buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/gmonette/cv",
  "_commit": {
    "id": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
    "author": "John Fox <jfox@mcmaster.ca>",
    "committer": "John Fox <jfox@mcmaster.ca>",
    "message": "update Roxygen to 7.3.3\n",
    "time": 1758750754
  },
  "_maintainer": {
    "name": "Georges Monette",
    "email": "georges+cv@yorku.ca"
  },
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 3.5.0",
      "role": "Depends"
    },
    {
      "package": "doParallel",
      "role": "Depends"
    },
    {
      "package": "car",
      "role": "Imports"
    },
    {
      "package": "foreach",
      "role": "Imports"
    },
    {
      "package": "glmmTMB",
      "role": "Imports"
    },
    {
      "package": "graphics",
      "role": "Imports"
    },
    {
      "package": "grDevices",
      "role": "Imports"
    },
    {
      "package": "gtools",
      "role": "Imports"
    },
    {
      "package": "insight",
      "role": "Imports"
    },
    {
      "package": "lattice",
      "role": "Imports"
    },
    {
      "package": "lme4",
      "role": "Imports"
    },
    {
      "package": "MASS",
      "role": "Imports"
    },
    {
      "package": "methods",
      "role": "Imports"
    },
    {
      "package": "nlme",
      "role": "Imports"
    },
    {
      "package": "parallel",
      "role": "Imports"
    },
    {
      "package": "stats",
      "role": "Imports"
    },
    {
      "package": "utils",
      "role": "Imports"
    },
    {
      "package": "boot",
      "role": "Suggests"
    },
    {
      "package": "carData",
      "role": "Suggests"
    },
    {
      "package": "dplyr",
      "role": "Suggests"
    },
    {
      "package": "effects",
      "role": "Suggests"
    },
    {
      "package": "ISLR2",
      "role": "Suggests"
    },
    {
      "package": "knitr",
      "role": "Suggests"
    },
    {
      "package": "latticeExtra",
      "role": "Suggests"
    },
    {
      "package": "leaps",
      "role": "Suggests"
    },
    {
      "package": "Metrics",
      "role": "Suggests"
    },
    {
      "package": "microbenchmark",
      "role": "Suggests"
    },
    {
      "package": "nnet",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "role": "Suggests"
    },
    {
      "package": "spelling",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "role": "Suggests"
    }
  ],
  "_owner": "gmonette",
  "_selfowned": true,
  "_usedby": 1,
  "_updates": [
    {
      "week": "2025-24",
      "n": 6
    },
    {
      "week": "2025-25",
      "n": 1
    },
    {
      "week": "2025-39",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 5,
  "_contributors": [
    {
      "user": "john-d-fox",
      "count": 475,
      "uuid": 14098498
    },
    {
      "user": "gmonette",
      "count": 56,
      "uuid": 786234
    },
    {
      "user": "friendly",
      "count": 10,
      "uuid": 456353
    }
  ],
  "_userbio": {
    "uuid": 786234,
    "type": "user",
    "name": "Georges Monette"
  },
  "_downloads": {
    "count": 580,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/cv"
  },
  "_devurl": "https://github.com/gmonette/cv",
  "_pkgdown": "https://gmonette.github.io/cv/",
  "_searchresults": 117,
  "_rbuild": "4.6.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/cv.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "manual.pdf"
  ],
  "_homeurl": "https://github.com/gmonette/cv",
  "_realowner": "gmonette",
  "_cranurl": true,
  "_releases": [
    {
      "version": "1.0.1",
      "date": "2023-10-31"
    },
    {
      "version": "1.1.0",
      "date": "2024-01-27"
    },
    {
      "version": "2.0.0",
      "date": "2024-04-29"
    },
    {
      "version": "2.0.2",
      "date": "2024-08-19"
    },
    {
      "version": "2.0.3",
      "date": "2024-09-22"
    },
    {
      "version": "2.0.4",
      "date": "2025-06-16"
    }
  ],
  "_exports": [
    "BayesRule",
    "BayesRule2",
    "checkFormula",
    "compareFolds",
    "cv",
    "cvCompute",
    "cvInfo",
    "cvMixed",
    "cvSelect",
    "fold",
    "folds",
    "GetResponse",
    "medAbsErr",
    "models",
    "mse",
    "rmse",
    "selectModelList",
    "selectStepAIC",
    "selectTrans",
    "selectTransStepAIC"
  ],
  "_datasets": [
    {
      "name": "Pigs",
      "title": "Body Weights of 48 Pigs in 9 Successive Weeks",
      "object": "Pigs",
      "class": [
        "data.frame"
      ],
      "fields": [
        "id",
        "week",
        "weight"
      ],
      "rows": 432,
      "table": true,
      "tojson": true
    }
  ],
  "_help": [
    {
      "page": "cv",
      "title": "Cross-Validate Regression Models",
      "topics": [
        "as.data.frame.cv",
        "as.data.frame.cvList",
        "cv",
        "cv.default",
        "cv.glm",
        "cv.lm",
        "cv.rlm",
        "cvInfo",
        "cvInfo.cv",
        "cvInfo.cvList",
        "cvInfo.cvModList",
        "plot.cv",
        "plot.cvList",
        "print.cv",
        "print.cvDataFrame",
        "print.cvList",
        "summary.cv",
        "summary.cvDataFrame",
        "summary.cvList"
      ]
    },
    {
      "page": "cv.function",
      "title": "Cross-Validate a Model-Selection Procedure",
      "topics": [
        "coef.cvSelect",
        "compareFolds",
        "cv.function",
        "cvInfo.cvSelect",
        "selectModelList",
        "selectStepAIC",
        "selectTrans",
        "selectTransStepAIC"
      ]
    },
    {
      "page": "cv.merMod",
      "title": "Cross-Validate Mixed-Effects Model",
      "topics": [
        "cv.glmmTMB",
        "cv.lme",
        "cv.merMod"
      ]
    },
    {
      "page": "cv.modList",
      "title": "Cross-Validate Several Models Fit to the Same Data",
      "topics": [
        "as.data.frame.cvModList",
        "cv.modList",
        "models",
        "plot.cvModList",
        "print.cvModList",
        "summary.cvModList"
      ]
    },
    {
      "page": "cvCompute",
      "title": "Utility Functions for the cv Package",
      "topics": [
        "checkFormula",
        "cvCompute",
        "cvMixed",
        "cvSelect",
        "fold",
        "fold.folds",
        "folds",
        "GetResponse",
        "GetResponse.default",
        "GetResponse.glmmTMB",
        "GetResponse.lme",
        "GetResponse.merMod",
        "GetResponse.modList",
        "print.folds"
      ]
    },
    {
      "page": "cost-functions",
      "title": "Cost Functions for Fitted Regression Models",
      "topics": [
        "BayesRule",
        "BayesRule2",
        "costFunctions",
        "medAbsErr",
        "mse",
        "rmse"
      ]
    },
    {
      "page": "Pigs",
      "title": "Body Weights of 48 Pigs in 9 Successive Weeks",
      "topics": [
        "Pigs"
      ]
    }
  ],
  "_readme": "https://github.com/gmonette/cv/raw/HEAD/README.md",
  "_rundeps": [
    "abind",
    "backports",
    "boot",
    "broom",
    "car",
    "carData",
    "cli",
    "codetools",
    "colorspace",
    "cowplot",
    "cpp11",
    "Deriv",
    "doBy",
    "doParallel",
    "dplyr",
    "farver",
    "foreach",
    "forecast",
    "Formula",
    "fracdiff",
    "generics",
    "ggplot2",
    "glmmTMB",
    "glue",
    "gtable",
    "gtools",
    "insight",
    "isoband",
    "iterators",
    "labeling",
    "lattice",
    "lifecycle",
    "lme4",
    "lmtest",
    "magrittr",
    "MASS",
    "Matrix",
    "MatrixModels",
    "mgcv",
    "microbenchmark",
    "minqa",
    "modelr",
    "nlme",
    "nloptr",
    "nnet",
    "numDeriv",
    "pbkrtest",
    "pillar",
    "pkgconfig",
    "purrr",
    "quantreg",
    "R6",
    "rbibutils",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "RcppEigen",
    "Rdpack",
    "reformulas",
    "rlang",
    "S7",
    "sandwich",
    "scales",
    "SparseM",
    "stringi",
    "stringr",
    "survival",
    "tibble",
    "tidyr",
    "tidyselect",
    "timeDate",
    "TMB",
    "urca",
    "utf8",
    "vctrs",
    "viridisLite",
    "withr",
    "zoo"
  ],
  "_vignettes": [
    {
      "source": "cv-notes.Rmd",
      "filename": "cv-notes.html",
      "title": "Computational and technical notes on cross-validating regression models",
      "author": "John Fox and Georges Monette",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Efficient computations for linear and generalized linear models",
        "Computation of the bias-corrected CV criterion and confidence intervals",
        "Why the complement of AUC isn't a casewise CV criterion",
        "The values of $\\mathrm{cv}(\\widehat{y}_i, y_i)$ that express AUC as a sum of casewise values are solutions of equation (\\ref{eq:cw}), which can be written as solutions of the following system of $2^{n_v}$ linear simultaneous equations in $2n_v$ unknowns:\\begin{equation}\\label{eq:lin}\\tag{2}(\\mathbf{U} -\\mathbf{Y}) \\mathbf{c}_0 + \\mathbf{Y} \\mathbf{c}_1",
        "References"
      ],
      "created": "2024-04-03 19:04:03",
      "modified": "2024-09-02 20:53:24",
      "commits": 6
    },
    {
      "source": "cv-mixed.Rmd",
      "filename": "cv-mixed.html",
      "title": "Cross-validating mixed-effects models",
      "author": "John Fox and Georges Monette",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Example: The High-School and Beyond data",
        "Example: Contrasting cluster-based and case-based CV",
        "Example: Crossed random effects",
        "References"
      ],
      "created": "2024-04-03 19:04:03",
      "modified": "2024-09-02 20:53:24",
      "commits": 6
    },
    {
      "source": "cv-selection.Rmd",
      "filename": "cv-selection.html",
      "title": "Cross-validating model selection",
      "author": "John Fox and Georges Monette",
      "engine": "knitr::rmarkdown",
      "headings": [
        "A preliminary example",
        "Polynomial regression for the Auto data revisited: meta cross-validation",
        "Mroz's logistic regression revisited",
        "Cross-validating choice of transformations in regression",
        "Selecting both transformations and predictors[^Venables]",
        "References"
      ],
      "created": "2024-04-03 19:04:03",
      "modified": "2024-09-15 20:56:57",
      "commits": 4
    },
    {
      "source": "cv.Rmd",
      "filename": "cv.html",
      "title": "Cross-validating regression models",
      "author": "John Fox and Georges Monette",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Cross-validation",
        "Examples",
        "Polynomial regression for the Auto data",
        "Using cv()",
        "Comparing competing models",
        "Logistic regression for the Mroz data",
        "Replicating cross-validation",
        "Manipulating \"cv\" and related objects",
        "Parallel computations",
        "References"
      ],
      "created": "2023-08-03 21:22:11",
      "modified": "2025-06-11 22:06:28",
      "commits": 64
    },
    {
      "source": "cv-extend.Rmd",
      "filename": "cv-extend.html",
      "title": "Extending the cv package",
      "author": "John Fox and Georges Monette",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Adding a cost criterion",
        "Adding a model class not covered by the default cv() method",
        "Independently sampled cases",
        "Calling cvCompute()",
        "Mixed-effects models",
        "Adding a model-selection procedure",
        "References"
      ],
      "created": "2023-08-25 23:50:20",
      "modified": "2024-09-05 14:51:13",
      "commits": 36
    }
  ],
  "_score": 7.420368379857525,
  "_indexed": true,
  "_nocasepkg": "cv",
  "_universes": [
    "gmonette"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "2.0.4",
      "date": "2026-05-13T09:06:41.000Z",
      "distro": "noble",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "31e05a1c58d52405d66c07248c854b7795539009419260f8f2ec15eff6853ddf",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "2.0.4",
      "date": "2026-05-13T09:06:33.000Z",
      "distro": "noble",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "5236073486f36e4153863166c202a1d079c780fc067dbfba261c2aa203356d8b",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "2.0.4",
      "date": "2026-05-13T09:06:51.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "f1b7f9ec44feae913069bddcb83bbf9f0b0411ae279ae4e072ea5c04ec17dc76",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "2.0.4",
      "date": "2026-05-13T09:05:54.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "12b47934fd80edc76cf5b7ee0d80e1b03e43b26fa60c74be12addcd94909ec44",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "2.0.4",
      "date": "2026-05-13T09:05:59.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "7636d24830444bbbd0fe863505864328a3195d31d9c084b842dad9562280ec69",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "2.0.4",
      "date": "2026-05-13T09:05:24.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "a93d271b5841788da7bc67bf116a5b239fdb0ad45f871079c9501e9d6ee76d4e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "2.0.4",
      "date": "2026-05-13T09:05:33.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "2f24cd0bf294d03a4102f52e9446507a4d2888c05e1f7332575cb80b69d8f67f",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "2.0.4",
      "date": "2026-05-22T09:48:23.000Z",
      "commit": "b30d5ddc7e7c095faf6a548c1118ef2e29ef3b8b",
      "fileid": "3206b92eec61da58104c3b224ae1a5d6818535286b0e9e5b282a55d46abd1c6f",
      "status": "success",
      "buildurl": "https://github.com/r-universe/gmonette/actions/runs/25788936425"
    }
  ]
}