regsel_f {AFR}R Documentation

Regressors selection

Description

The function allows to choose regressors based on multiple criteria as AIC, RMSE etc

Usage

regsel_f(
  model,
  pval = 0.3,
  metric = "adjr" & "aic",
  progress = FALSE,
  details = FALSE,
  ...
)
## S3 method for class 'regsel_f'
plot(x, model = NA, print_plot = TRUE, ...)

Arguments

model

is a linear regression model

pval

p value; variables with p value less than pval will enter into the model

metric

statistical metrics used to estimate the best model

progress

Logical; if TRUE, will display variable selection progress.

details

Logical; if TRUE, will print the regression result at each step.

...

other arguments

x

An object.

print_plot

logical; if TRUE, prints the plot else returns a plot object.

References

Hebbali, Aravind. Published 2020-02-10. olssr package

Examples

model <- lm(real_gdp ~ imp + exp + poil + eurkzt + tonia_rate, data = macroKZ)
regsel_f(model)

[Package AFR version 0.2.1 Index]