bestModel: Extract the best model (least sse) from a list of models

Description Usage Arguments Value Note

View source: R/Fitting.R

Description

Extract the best model (least sse) from a list of models

Usage

1
bestModel(models, digits = 6, orderOnly = FALSE, constrained = FALSE)

Arguments

models

the list of models

digits

the number of digits of sse that is considered significant

orderOnly

if FALSE, returns a reordered list of models. If TRUE, returns an integer vector representing the order of the models.

Value

an integer vector representing the order of the models if orderOnly is TRUE. A reordered list of models if orderOnly is FALSE (the default).

Note

The ordering process preserves the original order in the event of ties at the desired significance level.

This function relies upon the sse value being stored in an attribute of the model called naturalCoeffs.


EconModels/MacroGrowth documentation built on Dec. 17, 2019, 10:41 p.m.