[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-205252-105":53,"doc-detail-205252-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","cv-cross-validating-regression-models-in-r-journal-of-statistical-software-volume-116-issue-8","cv - Cross-Validating Regression Models in R - Journal of Statistical Software Volume 116 Issue 8","","The cv package implements cross-validation for standard R regression models using a uniform, generic function interface. It provides methods for many commonly used model classes, including mixed-effects models, and can be extended by adding methods for additional classes. The cv() function also cross-validates complex model-selection procedures involving variable transformations, predictor selection, and comparisons among competing models. Supplied methods support parallel computations, and linear and generalized linear model methods exploit computational efficiencies.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/cv-cross-validating-regression-models-in-r-journal-of-statistical-software-volume-116-issue-8/205252/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/cv-cross-validating-regression-models-in-r-journal-of-statistical-software-volume-116-issue-8/205252.png","ImageObject",442,249,{"name":88,"@type":89},"Xiajie","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-29","2026-09-05",true,{"@type":98,"interactionType":99,"userInteractionCount":8},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"What problem does cross-validation address in regression modeling?","Question",{"text":108,"@type":109},"Cross-validation estimates predictive accuracy by validating models on held-out data partitions. It helps assess adequacy while highlighting issues related to sample size reduction and randomness from data division.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"How does k-fold cross-validation differ from leave-one-out (LOO) cross-validation?",{"text":113,"@type":109},"In k-fold CV, the data are split into k folds and the model is fit k times, each time leaving one fold out for prediction. In LOO CV, k equals the number of cases, omitting one case at a time and refitting the model n times.",{"name":115,"@type":106,"acceptedAnswer":116},"What capabilities does the cv package provide for cross-validation in R?",{"text":117,"@type":109},"The cv package automates cross-validation for standard R regression model classes through the cv() function. It includes methods for linear, generalized linear, mixed-effects models, model lists, and for cross-validating complex model-selection processes, with support for parallel computations in many cases.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},205252,1791741379,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":8,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":135,"language":136,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":137,"faqs":138,"seo_title":139,"seo_description":61,"update_tm":140,"read_time":20},8814010472675,"https://avatar.qwps.com/avatar/WGlhamll","Journal of Statistical Software  \nMay 2026, Volume 116, Issue 8 . doi: 10.18637/jss.v116.i08  \ncv: An R Package for Cross-Validating Regression Models  \nJohn Fox   \nMcMaster University  \nGeorges Monette   \nYork University  \nAbstract  \nWe describe the cv package, which implements cross-validation for standard R regression models through a uniform and simple to use generic function. Methods for the cv() function are provided for many commonly employed classes of statistical models, including mixed-effects models, and it is straightforward to extend the cv package by writing methods for additional classes of models. The cv() function can also cross-validate complex model-selection procedures, such as those that include variable transformations, predictor selection, and selection among competing models. The cv() function generally supports parallel computations, and the supplied methods for linear and generalized linear models take advantage of computational efficiencies.  \nKeywords: cross-validation, regression analysis, model selection, R.  \n1 . Introduction  \nCross-validation (CV) is an essentially simple and intuitively reasonable approach to estimating the predictive accuracy of regression models. CV is developed in many standard sourceson regression modeling and “machine learning” – we particularly recommend James, Witten, Hastie, and Tibshirani (2021, Sections 5.1, 5.3)– and so we will describe the method only briefly here before taking up computational issues and some examples. See Arlot and Celisse (2010) for a wide-ranging, if technical, survey of cross-validation and related methods that emphasizes the statistical properties of CV.  \nValidating research by replication on independently collected data is a common scientific norm. Emulating this process in a single study by data-division is less common (see, e.g. , Barnard 1974): The data are randomly divided into two, possibly equal-size, parts; the first part is used to develop and fit (in the language of machine leaning, “train”) a statistical model; and then the second part is used to assess the adequacy of (“validate”) the model fit  \n2 cv: Cross-Validating Regression Models in R  \nto the first part of the data. Data-division, however, suffers from two problems: (1) Dividing the data decreases the sample size and thus increases sampling error; and (2), even more disconcertingly, the results can vary substantially based on the random division of the data, particularly in smaller samples. See Harrell Jr. (2015, Section 5.3) for cogent remarks about data-division and cross-validation.  \nCross-validation speaks to both of these issues. In CV, the data are randomly divided as equally as possible into several, say k, parts, called “folds.” The statistical model is fit k times, leaving each fold out in turn. Each fitted model is then used to predict the response variable for the cases in the omitted fold. A CV criterion (also termed a “cost” or “loss”measure), such as the mean-squared error (MSE) of prediction, is then computed using these predicted values. In the extreme, k equals n, the number of cases in the data, thus omitting individual cases and refitting the model n times – a procedure termed “leave-one-out (LOO) cross-validation.”  \nBecause the n models are each fit to n−1 cases, LOO CV produces a nearly unbiased estimate of the prediction error compared with a model fit to n cases. The n regression models are highly statistically dependent, however, based as they are on nearly the same data, and so the resulting estimate of prediction error has larger variance than if the predictions from the models fit to the n data sets were independent.  \nBecause predictions are based on smaller data sets, each of size approximately n − n/k , estimated prediction error for k-fold CV with k = 5 or 10 (commonly employed choices) is more biased than estimated prediction error for LOO CV. It is possible, however, to correct k-fold CV for bias (see Appendix A.2) .  \nThe relative varia","cbCaigtOZK1Sbv6s","https://ap.wps.com/l/cbCaigtOZK1Sbv6s","pdf",999104,41,"English","# Introduction\n## Cross-validation motivation and data-division\n# cv: Cross-Validating Regression Models in R\n## k-fold and leave-one-out cross-validation\n## Bias and variance considerations\n## Using cv() in R","[{\"question\":\"What problem does cross-validation address in regression modeling?\",\"answer\":\"Cross-validation estimates predictive accuracy by validating models on held-out data partitions. It helps assess adequacy while highlighting issues related to sample size reduction and randomness from data division.\"},{\"question\":\"How does k-fold cross-validation differ from leave-one-out (LOO) cross-validation?\",\"answer\":\"In k-fold CV, the data are split into k folds and the model is fit k times, each time leaving one fold out for prediction. In LOO CV, k equals the number of cases, omitting one case at a time and refitting the model n times.\"},{\"question\":\"What capabilities does the cv package provide for cross-validation in R?\",\"answer\":\"The cv package automates cross-validation for standard R regression model classes through the cv() function. It includes methods for linear, generalized linear, mixed-effects models, model lists, and for cross-validating complex model-selection processes, with support for parallel computations in many cases.\"}]","cv - Cross-Validating Regression Models in R - Journal of Statistical Software Volume 116 Issue 8 | PDF",1788578251]