liveBook · Manning

Aov() function

As explained in Statistics Slam Dunk

The aov() function is a base R function that fits analysis-of-variance models.

Use base R’s aov() function to fit one-way analysis-of-variance models. It tests whether a categorical predictor’s factor levels correspond to different means for a target variable. section 14.5.2

A practical workflow includes:

  • Use plot(model, which = c(2, 1)) to examine residual normality and equal variances across groups. section 14.5.2

Comparing scoring categories with wins

fit1 <- aov(z_wins ~ o_pts_cat, data = nba_stats) fits a model relating standardized regular-season wins to four offensive-points factor levels. Its near-zero p-value indicates different group means; diagnostics then assess model integrity. section 14.5.2

How Statistics Slam Dunk covers it

How deep it goes
Explains model syntax, summary output, and two diagnostic plots, but stops short of detailed post-hoc comparisons.
Examples
Uses NBA team wins predicted by offensive- and overall-points categories, with summaries and diagnostic plots.
What it assumes
Assumes a target, categorical predictor, factor levels, and data frame; relates the syntax to familiar linear regression.
What you can do after
Evaluate group mean differences and diagnose equal-variance and residual-normality issues in fitted ANOVA models.
How it connects
Connects one-way ANOVA with linear regression, factor levels, residuals, fitted values, diagnostic plots, and AIC.

Related concepts

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.