Residuals of sqrt(ele), log(slo), oxy and sqrt(amm)are normally
distributed, assuming that the power of the test is adequate. Try to find good
normalizing transformations for the other variables.
# Homogeneity of variances
bartlett.test(sqrt(ele), as.factor(spech.ward.gk))
bartlett.test(log(slo), as.factor(spech.ward.gk))
bartlett.test(oxy, as.factor(spech.ward.gk))
bartlett.test(sqrt(amm), as.factor(spech.ward.gk))
Variable sqrt(ele)has heterogeneous variances. It is not appropriate for
parametric ANOVA .
# ANOVA of the testable variables
summary(aov(log(slo) ~ as.factor(spech.ward.gk)))
summary(aov(oxy ~ as.factor(spech.ward.gk)))
summary(aov(sqrt(amm) ~ as.factor(spech.ward.gk)))
# Kruskal-Wallis test of variable elevation
kruskal.test(ele ~ as.factor(spech.ward.gk))
})
Are slope, dissolved oxygen and dissolved ammonium significantly different
among species clusters?
Does elevation differ among clusters?
Hints Note the use of with() at the beginning of the series of analyses to avoid the
repetition of the name of the object env in each analysis. This is preferable to the
use of attach() and detach() because the latter may lead to confusions if
you have several datasets in your R console, and some happen to have variables
with identical names.
The null hypothesis for the Shapiro test is that the variable is normally
distributed; in the Bartlett test, H 0 states that the variances are equal among the
groups. Therefore, for each of these tests, the p-value should be larger than the
significance level, i.e. P > 0.05, for the ANOVA assumptions to be fulfilled.
The parametric Bartlett test is sensitive to departures from normality. For nonnormal data, we provide a function called bartlett.perm.R that computes
parametric, permutation and bootstrap (i.e., permutation with replacement)
Bartlett tests.
108
4 Cluster Analysis
Précédent

- 121/444

Suivant