spScottKnott | R Documentation |
This function implements the Scott-Knott Clustering Algorithm for objects of class SARcrd, SARrcbd, and GEOanova.
spScottKnott(x, sig.level = 0.05, verbose = TRUE)
## S3 method for class 'SARanova'
spScottKnott(x, sig.level = 0.05, verbose = TRUE)
## S3 method for class 'GEOanova'
spScottKnott(x, sig.level = 0.05, verbose = TRUE)
x |
a fitted model object of class SARcrd, SARrcbd or GEOanova. |
sig.level |
a numeric value between zero and one giving the significance level to use. |
verbose |
should messages be printed during loading? |
For objects of class SARcrd or SARrcbd this function performs the standard Scott-Knott
Clustering Algorithm provided by the function SK
on the
adjusted response.
For objects of class GEOanova, the method is modified to take into account the spatial dependence among the observations. The method is described in Nogueira (2017).
a data frame containing the means and its group
Nogueira, C. H. Testes para comparações múltiplas de médias em experimentos com tendência e dependência espacial. 142 f. Tese (Doutorado em Estatística e Experimentação Agropecuária) | Universidade Federal de Lavras, Lavras, 2017
data("crd_simulated")
#Geodata object
geodados <- as.geodata(crd_simulated, coords.col = 1:2, data.col = 3,
covar.col = 4)
h_max <- summary(geodados)[[3]][[2]]
dist <- 0.6*h_max
# Computing the variogram
variograma <- spVariog(geodata = geodados,
trend = "cte", max.dist = dist, design = "crd",
scale = FALSE)
plot(variograma, ylab = "Semivariance", xlab = "Distance")
# Gaussian Model
ols <- spVariofit(variograma, cov.model = "gaussian", weights = "equal",
max.dist = dist)
# Compute the model and get the analysis of variance table
mod <- aovGeo(ols, cutoff = 0.6)
# Scott-Knott clustering algorithm
spScottKnott(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.