Extended summary information for a model fit. Currently linear and logistic regression models are supported.

info(x)

Arguments

x

an object of type lm or glm. If glm, then family must be binomial.

Value

A list produced by info.lm or info.glm.

Details

info is a generic S3 function providing detailed model information. The goal is to provide more extensive information than currently produced by summary. See the related methods for details.

See also

Examples

#######################
# multiple regression #
#######################
fit <- lm(mpg ~ hp + wt + accel + origin, data = auto_mpg)
info(fit)
#> MULTIPLE REGRESSION SUMMARY 
#> Model: mpg ~ hp + wt + accel + origin
#> Data : auto_mpg
#> N    : 388
#> 
#> Fit Indices 
#>  R.Squared Adj.R.Squared  AIC RMSE  MAE
#>      0.718         0.715 2217 4.14 3.15
#> 
#> Omnibus Test 
#> F(5,382) = 194.921, p < <2e-16  *** 
#> 
#> Anova Table (type III tests) 
#>               Sum Sq  DF F value Pr(>F)    
#> (Intercept) 5363.242   1 308.296 <0.001 ***
#> hp           217.649   1  12.511 <0.001 ***
#> wt          1007.306   1  57.903 <0.001 ***
#> accel          0.952   1   0.055  0.815    
#> origin       307.094   2   8.826 <0.001 ***
#> Residuals   6645.428 382                   
#> 
#> Regression Coefficients 
#>                    B      B*       SE      t Pr(>|t|)    
#> (Intercept) 43.26563  0.0000 2.464104 17.558 5.04e-51 ***
#> hp          -0.05632 -0.2783 0.015922 -3.537 4.54e-04 ***
#> wt          -0.00477 -0.5180 0.000627 -7.609 2.17e-13 ***
#> accel       -0.02862 -0.0101 0.122391 -0.234 8.15e-01    
#> origin2      0.96892  0.0472 0.646763  1.498 1.35e-01    
#> origin3      2.76148  0.1419 0.659001  4.190 3.46e-05 ***

#######################
# logistic regression #
#######################
fit2 <- glm(caesarian ~ age + bp + delivery.time, family = binomial, data = caesarian)
info(fit2)
#> LOGISTIC REGRESSION SUMMARY 
#> Formula: caesarian ~ age + bp + delivery.time
#> Data   : caesarian
#> N      : 80
#> 
#> Predicted category: yes
#> 
#> Omnibus Test 
#> Chi-square(5) = 15.2455, p = 0.009363 **
#> 
#> Fit Measures 
#> Stukel's GOF Test: Chi-square(2) = 0.0663, p < 0.9674
#> Tjur's Psuedo-R.squared: 0.1769
#> AIC: 105.8512 
#> 
#> Anova Table (type III tests) 
#>               LR Chisq DF Pr(>Chisq)   
#> age             0.6465  1   0.421353   
#> bp             12.1255  2   0.002328 **
#> delivery.time   6.9476  2   0.030999  *
#> 
#> Logistic Regression Coefficients 
#>                               B      SE       z Pr(>|z|)   
#> (Intercept)             1.02083 1.49393  0.6833 0.494407   
#> age                     0.03944 0.04928  0.8003 0.423531   
#> bpnormal               -2.05065 0.71483 -2.8687 0.004122 **
#> bphigh                 -0.46110 0.75158 -0.6135 0.539542   
#> delivery.timepremature -1.29707 0.67785 -1.9135 0.055685   
#> delivery.timelatecomer -1.53961 0.70396 -2.1871 0.028737  *
#> 
#> Odds Ratios (with 95% Confidence Intervals) 
#>                        Odds Ratio    2.5%  97.5%
#> age                        1.0402 0.94482 1.1489
#> bpnormal                   0.1287 0.02790 0.4775
#> bphigh                     0.6306 0.13739 2.7408
#> delivery.timepremature     0.2733 0.06659 0.9889
#> delivery.timelatecomer     0.2145 0.04907 0.8064