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.