compete: Returns the winning model

Description Usage Arguments Value Examples

View source: R/compete.r

Description

This function returns the best model as explained in the documentation for the autovar function.

Usage

1
compete(best, challenger, compare_outliers)

Arguments

best

A model given as a list with at least the properties model_score, nr_dummy_variables, and bucket.

challenger

Another model, also given as a list with properties model_score, nr_dummy_variables, and bucket.

compare_outliers

A boolean. When FALSE, the model comparison does not take the number of dummy variables into account.

Value

This function returns the best model of the two given models.

Examples

1
2
3
4
5
model1 <- list(logtransformed = FALSE, lag = 1, nr_dummy_variables = 1,
               model_score = 100, bucket = 0.05)
model2 <- list(logtransformed = FALSE, lag = 2, nr_dummy_variables = 2,
               model_score = 200, bucket = 0.01)
autovarCore:::compete(model1, model2, TRUE)

roqua/autovarCore documentation built on June 7, 2018, 6:59 a.m.