regsel_f: Regressors selection

View source: R/regsel_f.R

regsel_fR 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,
  ...
)

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

References

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

Examples

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

AFR documentation built on Sept. 11, 2024, 9:09 p.m.