***FEEBACK By Meghan Cephus

  1. I believe this student is missing the HTML link to a published website containing the markdown file.

  2. There are multiple spelling error even in the headers which I fixed. Since spell check doesn’t work well in R-Markdown I would write the paragraphs in a word processing document, spell check, then paste here.

Introduction

In this section, we are going to talk about model adequacy within ANOVA. We will over:

  1. How adequate are the assumptions that we’re making about our data to fit ANOVA
  2. The key assumptions of constant variance and normality.
  3. How to do some quick checks for model adequacy.
  4. Methods for doing multiple comparisons after we reject H(0) naught.

If we reject H(0) naught and ANOVA, and we want to go through and determine which pairs of those, means are different, we would do a multiple comparison test.

Assumptions - Normality

For our key assumptions, 1) constant variance and 2) normality; there are several ways in which one can try to check. Some ways are formal statistical procedures, and some are just graphs.

For normality, we are checking that the data follow a normal distribution. Thereby, the first thing we generally do is normal probability plot, when we plot the fitted values. The plotted data should fall in a roughly straight line

If it is in a C shaping or U shaping, this means it is not good. It indicates to us that there is a problem. We’re looking for something like where we have our data falling into a straight line.

Note: You could just throw your data onto a normal probability plot, but that may have some problems, especially if your data comes from different populations.

Use residuals instead of the raw data A lot of times we do these plots with the residuals:each observation minus each observation’s appropriate mean. It’s going to be the error, or the distance from each observation to the mean of that observation’s population. That way we are getting rid of that effect that we might have if our data comes from different populations.

Residual is defined as:

\[ E_i = X_i - \bar{X}_i \]

If it turns out that they are different populations, then our residuals are going to be funky because they’re going to have different means. You do not necessarily want to plot the real data. It’s going to be a better plot if you plot the residuals. That is, if you go ahead and you do your ANOVA analysis, you estimate these means and then you plot the residuals and the computers is going to keep track or it’s going to calculate these residuals for you. It’s the difference between each observation and the estimate of the mean of that population. Take all the observations from population i, get their average, and and then take each observation minus that average and that’s your residual

Formal test for normality

There’s a whole host of tests that you could go through to check for normality using the residuals.

  • The Lillieferd’s test
  • The Kolmogorov-Smirnov test (KS test)
  • Chi-Squere Test

Remember ANOVA is robust to violations of normality. So as long as my normal probability plot looks something good, then we’re okay. And only if it’s egregiously bad, you really need to worry about the normality assumption.

Methods to check constant variance

ANOVA is more sensitive to constant variance. If the variance across groups does not met the constant assumption, they the ANOVA results are not useful.

Checking for constant variance visually

  1. Put the residuals on the y-axis and then put the populations on the x-axis.
  2. Check if the residuals are in a line and roughly-relatively within the same distance, or the same width of the lines

You can get away with not fully meeting the normality assumption, but you can not really get away with not meeting constant variance.

If you do not meet constant variance, then you need to do something. That often is a transformation.

Example transformations:

  • The log transform
  • the square root transform
  • 1/X transform

You have several different ways to transform data and see if after that transformation you can make it look something like a straight line. You have to get those variances stabilized to be able to do ANOVA.

Note: keep in mind that we are plotting residuals, not data itself, so you are going to have to fit the model and then take a look at the residuals and then make a judgment about adequacy.

In a sense, yoy are working backward: You do the ANOVA and then you check to see whether or not your assumptions were satisfied versus checking your assumptions and doing the ANOVA.

You use the residuals because the residuals are going to have those mean effects taken out of them.

The Levene’s test

You don’t need to use residuals to do Levine’s test. That’s one that you can run just straight out You can do that before you even do the ANOVA. if you fail Levine’s test, you must do a transformation as well. pick the log, square root, 1/X or a Box Cox transformation (where you determine a power coefficient)

The Fishers test

That’s the one you would use if you wanted to do a hard statistical test to check for constant variance.

GLM, Generalized Linear Model.

Another approach is to just leave the whole world of ANOVA and moved to GLM, Generalized Linear Model. This way you do what’s called analysis of deviance instead of doing analysis of variance, and you have to have likelihood functions

There are cases when you’re going to need to do that if you have data where the response variable is known, but not normal, or if you want to be more precise.

Most of the time, thr brute force way is just to start doing transformations and see if it works. If the transformation doesn’t work, you try another one. You keep doing it until you get something that works, or in all, last case resort, you flip over to a GLM and go to another whole world of doing the analysis.

Multiple Comparison Method - Least Significant Difference (LSD)

If we reject H(0) in the ANOVA, then determine which pairs or means are significant different. We’re comparing the means of multiple population. When we’re doing ANOVA, we have something several different populations and we are selecting samples from these populations and we are using those samples to do the statistics. We have we have i different populations, j samples from each one.

Null Hyypothesis $$ H_0: _1 = _2 = . . . = _i \

H_a: _i $$ Let’s say that after we do the ANOVA, we conclude that we reject H(0). If we reject H(0), then we’re concluding that at least one of the Mu_i’s differs. That is, we have evidence that one of the Mu_i’s differs. So the question is, which one? Which Mu_i differs from the others?

We’re going to have lots and lots of different pairs that we’re going to want to compare, and there are two different ways of doing this.

The first way to do this is to use the LSD approach. Which the LSD stands for least significant difference

the least significant difference test is not good because it does not control family wise error rate. When you specify alpha, is going to be specified not per experiment, but per comparison. So each comparison is going to have the alpha that is specified

If you specify alpha to be 0. 05, then the first comparison is going to have 0.05, the second comparison 0.05, the third comparison 0.05. And as we’ve mentioned, when you put those all together; when we take all of those comparisons and we put them together, our family wise error rate may be very, very large. It may be so large that we almost are guaranteed to get at least one mean that differs when it actually doesn’t.

We don’t want to do that, thereby the LSD is not used often

$$ H_0: _i - _j = 0 \

H_a: _i - _j $$

The null says that the parameter would be zero divided by the standard error The only difference the LSD and the two sample t-test is that ot can be distributed as a t, where the degrees of freedom are going to correspond to the degrees of freedom that were used to calculate the mean square error; not the degrees of freedom that were used in the two sample case.

The full LSD formula is shown below.

$$

t_{(n-1)}

$$

Multiple Comparison Method - Tukey’s Honet Significant Difference (HSD)

Tukey’s HSD, which is the honest significant difference (HSD) test. The reason why they call it the honest is because this does control family wise error rate. That is, when you set the alpha, the alpha is for all of the tests. The alpha is the family wise error. The type 1 error, Not the type 1 error per experiment. Alpha is being set across all of experiments, that alpha corresponds to type 1 error. It is trying to compare all of the means. In that sense, it’s a much more fair test.

The Tukey test uses what is called the studentized range statistic, which is given by Q, which is a studentized range statistic. Defined as:

\[ q = \frac{\bar{X}_{\text{max}}- \bar{X}_{\text{min}}}{\sqrt{\frac{\text{MSE}}{n}}} \]

It’s going to be distributed as a Q, according to a studentized range distribution, where the degrees of freedom of Q are going to be equal to the degrees of freedom of the mean squared error.

From there you can set up a confidence interval on the difference between the means and if zero is in that interval you reject H(0), if it’s not, you fail to reject H(0) at that particular alpha.

The way that you’re going to see two keys written is often a series of confidence intervals. And you’re going to check the lower and the upper end point of those intervals and say, you know, is zero within the upper and lower end point?

If it is, you’re going to fail to reject.

If it’s not, you’re going to reject H(0). The Tukey’s test is going to be more conservative. because it’s controlling the family wise error rate. With the least significant difference test, since it’s just per comparison, it’s going to be much more liberal.

remember that the LSD test is, again, it’s just your two sample t-test with just the degrees of freedom adjusted.