Skip to contents

This function selects models from a data frame based on the AICc and VIF values. Models with AICc greater than negative infinity and VIF less than or equal to 6 are considered. The difference in AICc values for each model is calculated with respect to the model with the minimum AICc. Models with a difference in AICc less than or equal to the specified delta_aicc value are selected.

Usage

select_models(df, delta_aicc = 2)

Arguments

df

a data frame containing the models to select from.

delta_aicc

a numeric value specifying the maximum difference in AICc values allowed.

Value

a data frame containing the selected models and the AIC weights.

Examples

df <- data.frame(AICc = c(10, 12, 15, 20), max_vif = c(2, 4, 5, 6))
select_models(df)
#>   AICc max_vif DeltaAICc AICWeight
#> 1   10       2         0 0.7310586
#> 2   12       4         2 0.2689414
select_models(df, delta_aicc = 5)
#>   AICc max_vif DeltaAICc  AICWeight
#> 1   10       2         0 0.68967209
#> 2   12       4         2 0.25371618
#> 3   15       5         5 0.05661173