kfold_lm: Linear model with k-fold cross validation

View source: R/kfold_lm.R

kfold_lmR Documentation

Linear model with k-fold cross validation

Description

Function for linear model and its results

Usage

kfold_lm(data, formula = "y ~ .", k = 10)

Arguments

data

Name of the data frame.

formula

Model in the format "y ~ x". Default: Predict variable y with all other variables.

k

Number of kfolds. Default: 10.

Examples

kfold_lm(mtcars, "mpg ~ .")

JouniVatanen/Jmisc documentation built on Feb. 3, 2023, 12:28 a.m.