get.most.distant: Get Most Distant Model

Description Usage Arguments Details Value Examples

View source: R/get_most_distant_function.R

Description

This function can be used to find a model that is most distinct from all previously tested models.

Usage

1
get.most.distant(input = getwd(), mrun = NULL, max.number = 100)

Arguments

input

Either a string containing the directory which holds the "FAMoS-Results" folder or a matrix containing the tested models along with the respective information criteria. Default to getwd().

mrun

A string giving the number of the corresponding FAMoS run, e.g "004". If NULL (default), all FAMoS runs in the "FAMoS-Results/TestedModels/" folder will be used for evaluation.

max.number

The maximum number of times that the get.most.distant function tries to find the most distant model (see details). Default to 100.

Details

Taking the order from the 'TestedModels' files found in 'FAMoS-Results/TestedModels/', this function successively tries to obtain a previously untested model that is most distant from all previously tested ones (here, distance means the number of difference in fitted parameters). To this end, the function collects all previously tested models and sorts them according to their information criterion value (duplicates get removed in the process). Starting with the best model, the corresponding complement model is generated (i.e. the model containing all parameters that the best model didn't use) and the distance to all other models is calculated. The total distance of this model is then taken to be the minimal distance of all calculated distances. This procedure is repeated for the second best model and so on until all models have been assessed or the max.number of models is reached.

Value

A list containing in its first entry the maximal distance found, the second entry the parameter names and in its third entry the corresponding binary vector. Note that the model may not fulfill previously specified critical conditions.

Examples

1

FAMoS documentation built on April 14, 2020, 5:43 p.m.