One-way ANOVA app

(Click image to open app)

This app simulates data from a one-way ANOVA model

Model has a single factor ("treatment") with three levels. User can adjust population means of treatment levels, error variance, and sample size. Four model statements are displayed: a general ANOVA model, a general regression model (reflecting R's coefficient estimates table), a regression model with user-specified population parameter values included, and a regression model with estimated parameter values found by fitting the model to the simulated data. User can also choose three kinds of parameter coding and see how these affect regression results and formal model statement.

Notes on parameter codings

  • "Dummy" coding is the default in R and the default in this app. In this coding, 𝛽₀ is the mean of the baseline treatment (here, treatment 1). 𝛽₁ is the difference between the mean of treatment 2 and treatment 1. 𝛽₂ is the difference between the mean of treatment 3 and treatment 1. The app shows how to write the equivalent values using the traditional ANOVA parameters of πœ‡ and 𝜏.

  • Under "effects" coding, 𝛽₀ is the combined mean for all three treatments. 𝛽₁ is the difference between the mean of treatment 1 and the combined mean. 𝛽₂ is the difference between the mean of treatment 2 and the combined mean. The mean of treatment three can be calculated as 𝛽₀ - 𝛽₁ - 𝛽₂. This coding better reflects the traditional ANOVA parametrization using πœ‡ and 𝜏.

  • Under "cell means" coding, the intercept is removed; 𝛽₁, 𝛽₂, and 𝛽₃ are simply the means of treatment means 1, 2, and 3, respectively. This is straightforward to read in the R output, but note that none of these regression coefficients represent comparisons between group means. Their associated p-values test the (likely uninteresting) nulls that population treatment mean equals zero. As opposed to dummy and effects coding, which test that differences in means equal zero.

  • What I call "effects" coding is sometimes called "deviation" coding.