ols_KCV: K-Fold Cross Validation for OLS

View source: R/models.R

ols_KCVR Documentation

K-Fold Cross Validation for OLS

Description

ols_KCV makes the K-Fold Cross Validation for ordinary least squared regression

Usage

ols_KCV(data,k,y,x)

Arguments

data

full dataset which will be used for KCV

k

integer, which indicates how many training and test set will be splited from the dataset

y

dependent variable

x

independent variables

Value

the root mean square error after K-Fold Cross Validation on training set

Examples

df<-mtcars
ols_KCV(mtcars,5,"hp",c("mpg","qsec","disp"))

ProxReg documentation built on April 3, 2025, 9:21 p.m.