tests/testthat/_snaps/regress-output.md

output from regress is as expected

Code
  ols_regress(mpg ~ disp + hp + wt, data = mtcars)
Output
                           Model Summary                          
  ---------------------------------------------------------------
  R                       0.909       RMSE                 2.468 
  R-Squared               0.827       MSE                  6.964 
  Adj. R-Squared          0.808       Coef. Var           13.135 
  Pred R-Squared          0.768       AIC                158.643 
  MAE                     1.907       SBC                165.972 
  ---------------------------------------------------------------
   RMSE: Root Mean Square Error 
   MSE: Mean Square Error 
   MAE: Mean Absolute Error 
   AIC: Akaike Information Criteria 
   SBC: Schwarz Bayesian Criteria

                                 ANOVA                                 
  --------------------------------------------------------------------
                  Sum of                                              
                 Squares        DF    Mean Square      F         Sig. 
  --------------------------------------------------------------------
  Regression     931.057         3        310.352    44.566    0.0000 
  Residual       194.991        28          6.964                     
  Total         1126.047        31                                    
  --------------------------------------------------------------------

                                    Parameter Estimates                                    
  ----------------------------------------------------------------------------------------
        model      Beta    Std. Error    Std. Beta      t        Sig      lower     upper 
  ----------------------------------------------------------------------------------------
  (Intercept)    37.106         2.111                 17.579    0.000    32.782    41.429 
         disp    -0.001         0.010       -0.019    -0.091    0.929    -0.022     0.020 
           hp    -0.031         0.011       -0.354    -2.724    0.011    -0.055    -0.008 
           wt    -3.801         1.066       -0.617    -3.565    0.001    -5.985    -1.617 
  ----------------------------------------------------------------------------------------
Code
  ols_regress(lm(mpg ~ disp + hp + wt, data = mtcars))
Output
                           Model Summary                          
  ---------------------------------------------------------------
  R                       0.909       RMSE                 2.468 
  R-Squared               0.827       MSE                  6.964 
  Adj. R-Squared          0.808       Coef. Var           13.135 
  Pred R-Squared          0.768       AIC                158.643 
  MAE                     1.907       SBC                165.972 
  ---------------------------------------------------------------
   RMSE: Root Mean Square Error 
   MSE: Mean Square Error 
   MAE: Mean Absolute Error 
   AIC: Akaike Information Criteria 
   SBC: Schwarz Bayesian Criteria

                                 ANOVA                                 
  --------------------------------------------------------------------
                  Sum of                                              
                 Squares        DF    Mean Square      F         Sig. 
  --------------------------------------------------------------------
  Regression     931.057         3        310.352    44.566    0.0000 
  Residual       194.991        28          6.964                     
  Total         1126.047        31                                    
  --------------------------------------------------------------------

                                    Parameter Estimates                                    
  ----------------------------------------------------------------------------------------
        model      Beta    Std. Error    Std. Beta      t        Sig      lower     upper 
  ----------------------------------------------------------------------------------------
  (Intercept)    37.106         2.111                 17.579    0.000    32.782    41.429 
         disp    -0.001         0.010       -0.019    -0.091    0.929    -0.022     0.020 
           hp    -0.031         0.011       -0.354    -2.724    0.011    -0.055    -0.008 
           wt    -3.801         1.066       -0.617    -3.565    0.001    -5.985    -1.617 
  ----------------------------------------------------------------------------------------


Try the olsrr package in your browser

Any scripts or data that you put into this service are public.

olsrr documentation built on May 29, 2024, 12:35 p.m.