dgc_test {ClustMC} | R Documentation |
Di Rienzo, Guzman and Casanoves test for multiple comparisons
Description
Di Rienzo, Guzman and Casanoves (DGC) test for multiple comparisons.
Implements a cluster-based method for identifying groups of nonhomogeneous
means. Average linkage clustering is applied to a distance matrix obtained
from the sample means. The distribution of Q
(distance between the
source and the root node of the tree) is used to build a test with a
significance level of \alpha
. Groups whose means join above
c
(the \alpha
-level cut-off criterion) are statistically
different.
Usage
dgc_test(
y,
trt,
alpha = 0.05,
show_plot = TRUE,
console = TRUE,
abline_options,
...
)
Arguments
y |
Either a model (created with |
trt |
If |
alpha |
Value equivalent to 0.05 or 0.01, corresponding to the significance level of the test. The default value is 0.05. |
show_plot |
Logical value indicating whether the constructed dendrogram should be plotted or not. |
console |
Logical value indicating whether the results should be printed on the console or not. |
abline_options |
|
... |
Optional arguments for the |
Value
A list with three data.frame
and one hclust
:
stats |
|
groups |
|
parameters |
|
dendrogram_data |
object of class |
Author(s)
Santiago Garcia Sanchez
References
Di Rienzo, J. A., Guzman, A. W., & Casanoves, F. (2002). A Multiple-Comparisons Method Based on the Distribution of the Root Node Distance of a Binary Tree. Journal of Agricultural, Biological, and Environmental Statistics, 7(2), 129-142. <jstor.org/stable/1400690>
Examples
data("PlantGrowth")
# Using vectors -------------------------------------------------------
weights <- PlantGrowth$weight
treatments <- PlantGrowth$group
dgc_test(y = weights, trt = treatments, show_plot = FALSE)
# Using a model -------------------------------------------------------
model <- lm(weights ~ treatments)
dgc_test(y = model, trt = "treatments", show_plot = FALSE)