I am trying to test the normality of pesticides residues in fish with 6 pesticides as quantitative variables and 3 qualitative variables with 8 factors in total. how do i model the dataset to succesfully test for normality

I am trying to test the normality of pesticides residues in fish with 6 pesticides as quantitative variables and 3 qualitative variables with 8 factors in total. how do i model the dataset to succesfully test for normality

Do you mean you want to test the residuals from a regression for normality or that you want to test the pesticide data for normality.

And out of curiosity, why do you care about normality?

fit <- lm(mpg ~ drat + as.factor(cyl),mtcars)
plot(fit, which = 2)

# null is that the residuals are normally distributed
shapiro.test(resid(fit))
#> 
#>  Shapiro-Wilk normality test
#> 
#> data:  resid(fit)
#> W = 0.97876, p-value = 0.7628

Created on 2023-11-22 with reprex v2.0.2

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.