1 Introduction

Stepwise regression is a widely employed data-mining technique aimed at identifying a valuable subset of predictors for utilization in a multiple regression model. To facilitate this process, we have developed the R package StepReg. Depending on the nature of the response variable, StepReg facilitates users in conducting linear regression for continuous outcomes, logistic regression for binary outcomes, Cox regression for time-to-event outcomes, and Poisson regression for count outcomes, incorporating popular selection criteria. It provides a versatile set of stop rules available in forward selection, backward elimination, both-direction, and best subset methods.

Here, we applied the StepReg package to four well-established and diverse datasets—mtcars, remission, lung, and CreditCard—utilizing distinct parameters across various regression scenarios. These datasets provide robust test cases for showcasing the capabilities and versatility of the StepReg package in real-world applications. Through practical demonstrations, we illustrated the application of linear stepwise regression for continuous outcomes, logistic stepwise regression for binary outcomes, Cox stepwise regression for time-to-event outcomes, and Poisson stepwise regression for count outcomes. These examples offer users valuable insights into the effective utilization of StepReg for variable selection in different regression scenarios, providing a comprehensive guide for those seeking proficiency in incorporating StepReg into their analytical toolkit.

A breif introduction for four datasets is descripted as below,

  • mtcars: the mtcars dataset is a classic automotive dataset that provides information on various car models and their performance attributes. With 32 observations and 11 variables, it includes details such as miles per gallon (mpg), horsepower, and the number of cylinders.

  • remission: the remission dataset is relevant in the context of medical research, specifically in oncology. It captures data related to the remission status of leukemia patients. The dataset includes variables such as cellularity of the marrow clot section, the highest temperature before the start of treatment, and remission status (1 for remission and 0 for non-remission).

  • lung: the lung dataset is a dataset in the survival analysis domain, containing information related to the survival times of 228 patients with advanced lung cancer. It includes variables such as the patient’s age, the type of treatment received, and survival status.

  • CreditCard: the CreditCard dataset is associated with credit risk analysis and financial research. It contains information about credit card transactions, including details such as the amount spent, credit limit, and payment status.

2 StepReg Output

A list containing multiple tables will be returned. Names and descriptions of each table are outlined as follows:

  • Table 1. Summary of Parameters: This table presents the parameters utilized in stepwise regression along with their default or user-specified values.

  • Table 2. Variables and Types: This table outlines the variables and their respective types utilized in the dataset.

  • Table names prefixed with Table. Selection Process: This table details overview of the variable selection process. Variables are selected based on information criteria rules, such as AIC, BIC, SBC, IC(1), HQ, etc., where lower values indicate better model fit. The significance levels include SLE for the entry of variables in forward selection and SLS for staying in backward elimination. For Rsq or adjusted R-squared, higher values indicate a better model fit.

  • Tabel names prefixed with Table. Parameter Estimates: This table provides summary information for the optimal models.

3 Demo

This section provides 9 examples utilizing distinct parameters across various regression scenarios with the above 4 datasets.

3.1 linear stepwise regression with mtcars

Example1: In this analysis, we used mpg as the response variable, with all other variables serving as predictors, employing a strategy of forward and a metric of AIC for linear stepwise regression. The analysis involved enforcing disp and cyl to be included in all models.

    library(StepReg)
    data(mtcars)
    formula <- mpg ~ .
    exam1 <- stepwise(formula = formula,
                      data = mtcars,
                      type = "linear",
                      include = c("disp","cyl"),
                      strategy = "forward",
                      metric = "AIC")
    exam1
## Table 1. Summary of Parameters            
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##            Parameter              Value   
## ——————————————————————————————————————————
## included variable               disp cyl   
## strategy                        forward    
## metric                          AIC        
## tolerance of multicollinearity  1e-07      
## multicollinearity variable      NULL       
## intercept                       1          
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 2. Type of Variables                    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable type  Variable name  Variable class 
## ——————————————————————————————————————————————
## Dependent      mpg            numeric          
## Independent    cyl            numeric          
## Independent    disp           numeric          
## Independent    hp             numeric          
## Independent    drat           numeric          
## Independent    wt             numeric          
## Independent    qsec           numeric          
## Independent    vs             numeric          
## Independent    am             numeric          
## Independent    gear           numeric          
## Independent    carb           numeric          
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 3. Selection Process under AIC                                                 
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        AIC        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     1                             0               1              149.943449990894   
## 0     disp cyl                      -2              3              108.33357089067    
## 1     wt                            3               4              98.7462938182664   
## 2     hp                            4               5              97.5255371708581   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 4. Parameter Estimates for mpg under AIC                                                
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##   Variable         Estimate           Std. Error           t value             Pr(>|t|)       
## ——————————————————————————————————————————————————————————————————————————————————————————————
## (Intercept)  40.8285367422432    2.75746792810596    14.8065318642844   1.76140221350856e-14   
## disp         0.0115992393009777  0.0117268091002486  0.989121525030348  0.331385561864358      
## cyl          -1.29331972351378   0.655876754872712   -1.97189443581482  0.0589468066844992     
## wt           -3.85390352303833   1.01547364107822    -3.79517829625422  0.000758947039357617   
## hp           -0.020538376368824  0.0121467704321512  -1.69085078898512  0.102379131471602      
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

Visulization of the selection process using information criteron AIC.

    plot(exam1)

Example2: In this illustration, we maintained mpg as the response variable, while designating the other variables as predictors. The chosen strategy was bidirectional with AIC, AICc, BIC,HQ, HQc, SBC, and SL as the stopping criterion, and the significance levels for entry (sle) and stay (sls) were both set to 0.05 parallelly. The analysis involved removing intercept from the model. The specific characteristics of the data and the goals of the analysis in each subject area require users to choose different stepwise regression method and selection criteria. Users can compare all metics through the output list or the plots.

    formula <- mpg ~ . + 0
    exam2 <- stepwise(formula = formula,
                      data = mtcars,
                      type = "linear",
                      strategy = "bidirection",
                      metric = c("AIC","SBC","SL","AICc","BIC","HQ","HQc"),
                      sle = 0.05,
                      sls = 0.05)
    exam2
## Table 1. Summary of Parameters                                          
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##            Parameter                             Value                  
## ————————————————————————————————————————————————————————————————————————
## included variable               NULL                                     
## strategy                        bidirection                              
## metric                          AIC & SBC & SL & AICc & BIC & HQ & HQc   
## entry significance level (sle)  0.05                                     
## stay significance level (sls)   0.05                                     
## test method                     F                                        
## tolerance of multicollinearity  1e-07                                    
## multicollinearity variable      NULL                                     
## intercept                       0                                        
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 2. Type of Variables                    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable type  Variable name  Variable class 
## ——————————————————————————————————————————————
## Dependent      mpg            numeric          
## Independent    cyl            numeric          
## Independent    disp           numeric          
## Independent    hp             numeric          
## Independent    drat           numeric          
## Independent    wt             numeric          
## Independent    qsec           numeric          
## Independent    vs             numeric          
## Independent    am             numeric          
## Independent    gear           numeric          
## Independent    carb           numeric          
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 3. Selection Process under AIC                                                 
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        AIC        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              131.940615397799   
## 2     carb                          2               2              112.874977003721   
## 3     gear                          3               3              105.767914676203   
## 4     hp                            4               4              105.399654906399   
## 5     qsec                          5               5              105.277861812131   
## 6     wt                            6               6              100.437613232709   
## 7                    hp             5               5              98.4440186423183   
## 8     am                            6               6              97.8009315992234   
## 9                    gear           5               5              96.5751826224886   
## 10                   carb           4               4              96.0485980614551   
## 11                   drat           3               3              95.418690850739    
## 12    disp                          4               4              95.3954043177414   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 4. Selection Process under SBC                                                 
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        SBC        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              99.4063513005992   
## 2     carb                          2               2              81.8064488093206   
## 3     gear                          3               3              76.1651223846019   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 5. Selection Process under SL                                                      
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn           SL          
## —————————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              1                      
## 1     drat                          1               1              2.44913223058495e-22   
## 2     carb                          2               2              1.03775546495333e-05   
## 3     gear                          3               3              0.00438861027007104    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 6. Selection Process under AICc                                                
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        AICc       
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              132.354408501248   
## 2     carb                          2               2              113.732119860864   
## 3     gear                          3               3              107.249396157684   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 7. Selection Process under BIC                                                 
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        BIC        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              97.7553842586695   
## 2     carb                          2               2              79.2794817092699   
## 3     gear                          3               3              72.9946131788242   
## 4     hp                            4               4              72.9415244192211   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 8. Selection Process under HQ                                                  
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn         HQ        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              96.0182982097902   
## 2     carb                          2               2              75.0303426277027   
## 3     gear                          3               3              66.0009631121751   
## 4     hp                            4               4              63.7103861543619   
## 5     qsec                          5               5              61.6662758720848   
## 6     wt                            6               6              54.9037101046532   
## 7                    hp             5               5              54.8324327022722   
## 8     am                            6               6              52.2670284711681   
## 9     disp                          7               7              51.5596073775111   
## 10    hp                            8               8              50.5198981811353   
## 11                   carb           7               7              50.5007045958875   
## 12    cyl                           8               8              50.3437098642926   
## 13    carb                          9               9              50.2608086854785   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 9. Selection Process under HQc                                                 
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Step  EnteredEffect  RemovedEffect  NumberEffectIn  NumberParmsIn        HQc        
## —————————————————————————————————————————————————————————————————————————————————————
## 0     0                             0               0              Inf                
## 1     drat                          1               1              96.0263343627548   
## 2     carb                          2               2              75.052537716843    
## 3     gear                          3               3              66.0441202299477   
## 4     hp                            4               4              63.7820933654303   
## 5     qsec                          5               5              61.7750318088718   
## 6     wt                            6               6              55.0590757286348   
## 7                    hp             5               5              54.9411886390593   
## 8     am                            6               6              52.4223940951496   
## 9     disp                          7               7              51.7723907320945   
## 10    hp                            8               8              50.802381133829    
## 11                   carb           7               7              50.713487950471    
## 12    cyl                           8               8              50.6261928169863   
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 10. Parameter Estimates for mpg under AIC                                            
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable       Estimate           Std. Error           t value             Pr(>|t|)       
## ———————————————————————————————————————————————————————————————————————————————————————————
## qsec      1.70550996283541    0.127485704584404   13.3780486870687   1.09964868080962e-13   
## wt        -4.61279456246674   1.15817323630342    -3.98281916545536  0.000440008628764359   
## am        4.18085430467977    1.01361607335742    4.12469219320039   0.000300527233592535   
## disp      0.0120200576653963  0.0088914542638529  1.35186633240215   0.187238258962162      
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 11. Parameter Estimates for mpg under SBC                                          
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable      Estimate          Std. Error           t value             Pr(>|t|)       
## —————————————————————————————————————————————————————————————————————————————————————————
## drat      3.85142334610757   1.0678868653112    3.6065836852345    0.00115059878350687    
## carb      -2.36055514388328  0.350142761922923  -6.74169339077442  2.12967212881877e-07   
## gear      3.4883542511301    1.12895206584177   3.08990466174409   0.00438861027007103    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 12. Parameter Estimates for mpg under SL                                           
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable      Estimate          Std. Error           t value             Pr(>|t|)       
## —————————————————————————————————————————————————————————————————————————————————————————
## drat      3.85142334610757   1.0678868653112    3.6065836852345    0.00115059878350687    
## carb      -2.36055514388328  0.350142761922923  -6.74169339077442  2.12967212881877e-07   
## gear      3.4883542511301    1.12895206584177   3.08990466174409   0.00438861027007103    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 13. Parameter Estimates for mpg under AICc                                         
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable      Estimate          Std. Error           t value             Pr(>|t|)       
## —————————————————————————————————————————————————————————————————————————————————————————
## drat      3.85142334610757   1.0678868653112    3.6065836852345    0.00115059878350687    
## carb      -2.36055514388328  0.350142761922923  -6.74169339077442  2.12967212881877e-07   
## gear      3.4883542511301    1.12895206584177   3.08990466174409   0.00438861027007103    
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 14. Parameter Estimates for mpg under BIC                                             
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable       Estimate            Std. Error           t value             Pr(>|t|)       
## ————————————————————————————————————————————————————————————————————————————————————————————
## drat      4.30273288409265     1.09158280873171    3.94173749318379   0.000491150652824566   
## carb      -1.73804836219828    0.54597600366577    -3.18337866596471  0.00355127557199684    
## gear      3.17367474781416     1.12779616721381    2.81404994987227   0.00885014913869611    
## hp        -0.0155479574747606  0.0106015597450293  -1.46657264107297  0.153634601937481      
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 15. Parameter Estimates for mpg under HQ                                              
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable       Estimate            Std. Error           t value             Pr(>|t|)       
## ————————————————————————————————————————————————————————————————————————————————————————————
## drat      1.24018628116636     1.43081088945576    0.866771626009983   0.395019989028695     
## gear      1.05507041373944     1.31730971553748    0.800928135042981   0.431369721203034     
## qsec      1.21092335916019     0.39825927287781    3.0405402752084     0.00580910211687029   
## wt        -3.8393173477773     1.81635802262831    -2.11374481239207   0.0455922405971267    
## am        2.78900560523413     1.87631320367996    1.48642859825542    0.15074627783938      
## disp      0.013377487347384    0.0171483102637304  0.780105278108835   0.443283496072846     
## hp        -0.0200206683398262  0.0202056393976394  -0.990845572655583  0.332071276534613     
## cyl       0.314427335966453    0.637410972654929   0.493288238601867   0.626486125552571     
## carb      -0.269382366878572   0.791924966403595   -0.340161477800012  0.736822040562188     
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
## 
## Table 16. Parameter Estimates for mpg under HQc                                             
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗
##  Variable       Estimate            Std. Error           t value             Pr(>|t|)       
## ————————————————————————————————————————————————————————————————————————————————————————————
## drat      1.15464081893128     1.38234393696422    0.835277522515128  0.411799846499336      
## gear      0.86861885215473     1.17558240530996    0.738883848747045  0.467142793848725      
## qsec      1.30385655642974     0.28438801586838    4.58478024275534   0.000119371208464951   
## wt        -4.28678423131556    1.22920122659441    -3.48745521772087  0.00190040875483783    
## am        2.83676935913337     1.83625846165786    1.54486387312394   0.135464286600943      
## disp      0.0173369535398226   0.0123585220697692  1.40283388595724   0.173471044902963      
## hp        -0.0236106906721794  0.0169099008757928  -1.39626428597101  0.175416642765162      
## cyl       0.25167003723096     0.598781514963363   0.420303618167569  0.678003000841066      
## ‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗‗

Visulization of the selection process using bidirection strategy under information criteron AIC, AICc, BIC,HQ, HQc, SBC, and SL with sle=0.05 and sls=0.05.

    plot(exam2)