oos.comparison: This function compares the predictive performance of several...

View source: R/oos.comparison.R

oos.comparisonR Documentation

This function compares the predictive performance of several models fitted on the same data

Description

The number of bootstraps should be the same for each model Ideally, the seed used in bootstrapping should also be the same

Usage

oos.comparison(objectlist, xlabel = "Model")

Arguments

objectlist

An list with output objects from the bootstrap functions in lmap

xlabel

A character object, specifying the label on the horizontal axis. Default is "Model"

Value

plot A boxplot with prediction errors for each model

pe A data frame with average prediction error for each bootstrap

fit A matrix with prediction error statistics for each model

Examples

## Not run: 
data(dataExample_mru)
y = as.matrix(dataExample_mru[ , 1])
X = as.matrix(dataExample_mru[ , 2:6])
output2 = mrrr(y = y, X = X, S = 2)
b2 = bootstrap.mrrr(output2)
output3 = mrrr(y = y, X = X, S = 3)
b3 = bootstrap.mrrr(output3)
myobjects = list(b2, b3)
comparison = oos.comparison(myobjects)
comparison$plot
comparison$fit

## End(Not run)

lmap documentation built on April 3, 2025, 5:47 p.m.

Related to oos.comparison in lmap...