2
$\begingroup$

Let's say I have $5$ stains of a bacteria, and I want to test the number of bacterias on each stain to different temperatures ($27, 35$ and $43$ degrees), and different concentrations of a product applied to each stain ($0.6, 1.0, 1.2, 1.4$ and $1.8$). So at first I considered a factorial design $5\times 3 \times 5$ with two replications for each factor, and I'd like to test the significance of each factor and interactions with each other. That is: $$y_{ijkr} = \mu + \alpha_i + \beta_j + \gamma_k + (\alpha \beta)_{ij} + (\alpha\gamma)_{ik} + (\beta\gamma)_{jk} + (\alpha\beta\gamma)_{ijk} + \epsilon_{ijkr}$$ where $y_{ijkr}$ is the dependent variable (number of bacterias), $\mu$ is the global mean, $\alpha_i$ is the effect of the $i$-th level of the factor $A$ ($A$ = stains) where $i = 1, \dots 5$, $\beta_j$ is the effect of the $j$-th level of the factor $ B$ ($B$ = temperature) where $j = 1, 2, 3$, $\gamma_k$ is the effect of the $k$-th level of the factor $C$ ($C$ = concentration level), where $k = 1, \dots , 5$, $\epsilon_{ijkr} \sim N(0, \sigma)$ and $r$ is the number of replications, in this case $2$, making a total of $150$ observations.

First I have to check the model hypothesis. The normality assumption should be tested for each factor, but the problem is that the SPSS Shapiro-Wilk test shows normality for some factors and non-normality for others. However, when looking at the Q-Q plots, there doesn't seem to be really significant difference to the line. So

Should I accept the hypothesis that the data comes from a normal distribution?

I should also check for homocedasticity, but when doing the ANOVA table with Levene's test, I get a message that says "Levene statistic cannot be computed because the absolute deviations are constant within each cell".

Why do I get that message? How can I test for homocedasticity without Levene test?

$\endgroup$
  • 2
    $\begingroup$ Checking model assumptions is good but more fundamentally, it would help if you thought more about the model you are fitting. Temperature and your product may have nonlinear effects on bacterial concentration and interact in a complex manner. But this is not reflected in the model you are fitting (I think - it's unclear because you don't state the precise model). $\endgroup$ – mkt Dec 8 '17 at 13:46
  • $\begingroup$ @mkt How could I make it clearer? You are correct I didn't consider that the interactions might be more complex, but after all this is a data I chose for an assignment to an ntroduction to Experimental Design class and we haven't cover anything more than that (model assumptions and significant difference between factors). Do you believe I should switch to another data so that the interactions are more likely to be linear? $\endgroup$ – user313212 Dec 8 '17 at 14:06
  • $\begingroup$ You could make the question clearer by specifying your model i.e. write the equations so it's clear you are doing a straightforward multiple linear regression. If this a merely an exercise to teach yourself some methods, it seems fine and I wouldn't necessarily recommend switching. But keep in mind that in any real analysis, model checking is less important than writing a good model or set of models. Or at least downstream of it. $\endgroup$ – mkt Dec 8 '17 at 14:20
  • 1
    $\begingroup$ @mkt Thank you! I've tried to edit the question accordingly $\endgroup$ – user313212 Dec 8 '17 at 14:39
2
$\begingroup$

Your statement that the assumption of normality has to be tested for each factor is not correct I am afraid. What you need to test, if you need to test anything, is the normality of the residuals from your model. Similarly if you want to plot a Q-Q plot this is done for the residuals.

The assumption that the variance does not depend on the mean can best be examined by plotting the residuals against the predicted values from the model. Plotting a transformed versions (the square root of the absolute value of the residual) can give a clearer plot as the relationship between mean and variance is then shown by a straight line.

But, as @mkt suggests in comments, you need to make sure you have a scientifically sensible model first.

$\endgroup$
  • $\begingroup$ Oh, now that I've done a quick google search it seems that my normality assumption issue wasn't an issue at all! I don't know where I got that idea from, but thank you for clarification. So doing a Q-Q plot for my dependent variable and checking it fits the line is enough? And for the homogeneity variance part, just to make sure, when plotting the predicted values vs. residuals, the scatterplot shouldn't show any pattern at all, should it? $\endgroup$ – user313212 Dec 8 '17 at 14:44
  • $\begingroup$ Just a horizontal band with no obvious features. There are several posts on this site about regression diagnostics which have examples. $\endgroup$ – mdewey Dec 8 '17 at 14:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.