liveBook · Manning

Glance() function

As explained in Statistics Slam Dunk

The glance() function from broom returns a one-row summary of model-level statistics.

How well does a regression explain NBA regular-season wins? The broom glance() function returns one row of model-level statistics, making key measures easy to inspect together. section 5.7.3

For fit1, glance() reports R-squared, adjusted R-squared, sigma, the model statistic, p-value, information criteria, residual degrees of freedom, and observations. The model explains about 20% of win variance, or about 14% after adjustment for its predictors. section 5.7.3

Inspecting a fitted model

glance(fit1) returns a one-row tibble. Its output includes r.squared = 0.202, adj.r.squared = 0.137, sigma = 10.9, p.value = 0.0150, df.residual = 61, and nobs = 67. section 5.7.3

glance(fit1)
## # A tibble: 1 × 12
##   r.squared adj.r.squared sigma statistic p.value    df logLik 
##       <dbl>         <dbl> <dbl>     <dbl>   <dbl> <dbl>  <dbl>
## 1     0.202         0.137  10.9      3.09  0.0150     5  -252.  
##        AIC   BIC deviance df.residual  nobs
##      <dbl> <dbl>    <dbl>       <int> <int>
## 1     518.  533.    7230.          61    67

Browse the complete one-row glance() output, including AIC, BIC, deviance, log-likelihood, and residual statistics. section 5.7.3

How Statistics Slam Dunk covers it

How deep it goes
Returns and interprets model-fit statistics, stopping short of explaining each statistic beyond R-squared and adjusted R-squared.
Examples
Uses an NBA wins model with hustle predictors and displays its one-row glance() tibble.
What it assumes
Builds on fitted linear regression models, predictors, observed values, and fitted values.
What you can do after
Evaluate model fit by reading consolidated regression statistics, including explained variance and adjusted explanatory power.
How it connects
Connects regression models with R-squared, adjusted R-squared, predictors, p-values, and fitted values.

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.