I have an Randomized block design experimental set up and a data consisting of species abundance. I would like to test for normality of the residuals, as in unexplained variance due tot the blocks.

I am new to statitstics. To find the resisuals I understand I need to create a linear model (lm()). But from the examples I have found online, it only works with one parameter/column (like an environmental variable), right? How do I deal with my data? Do I need to use the diversity function?

  • 4
    $\begingroup$ You can perform a linear regression on one dependent (y) variable and one or several independent variables, e.g. lm(y ~ x1 + x2 + x3). $\endgroup$ – Roman Luštrik Apr 28 '19 at 9:47

To test the normality assumption I would recommend to use the Shapiro-Wilk test in your case. (if you have more than 30 observations)


In order to check the homoskedasticity assumption the Bartlett and Levene test are appropriate tools.

bartlett.test(count ~ spray, data = InsectSprays)
leveneTest(count ~ spray, data = InsectSprays)
| cite | improve this answer | |

Your Answer

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