spTukey {spANOVA} | R Documentation |
Compute Tukey Honest Significant Differences for a Spatially Correlated Model
Description
Perform multiple comparisons of means treatments based on the Studentized range statistic when the errors are spatially correlated.
Usage
spTukey(x, sig.level = 0.05, verbose = TRUE)
## S3 method for class 'SARanova'
spTukey(x, sig.level = 0.05, verbose = TRUE)
## S3 method for class 'GEOanova'
spTukey(x, sig.level = 0.05, verbose = TRUE)
Arguments
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? |
Details
For objects of class SARcrd or SARrcbd this function performs the standard
Tukey's ‘Honest Significant Difference’ method provided by the function
TukeyHSD
on the adjusted response.
For objects of class GEOanova, the method is modified to take into account
the spatial dependence among the observations. First, we estimate a
contrast matrix (C
) using cont.tuk function and then after estimate the
spatial mean of each treatment (\mu_i
) we can assess the significance of
the contrast by
|c_i \mu_i| > {HSD}_i
where HSD_i = q(\alpha, k, \nu) * sqrt(0.5*{w}_ii)
and
k
is the number of treatments, \alpha
is the level of significance,
\nu
is the degree of freedom of the model, {w}_ii
is the variance of
the i-th contrast.
Value
a data frame containing the original mean, the spatially filtered mean and its group. For the class GEOanova, the spatial dependence is filtered out using geostatistics, while for the class SARanova the adjusted response based on SAR model is employed.
References
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
Examples
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)
lines(ols, col = 1)
# Compute the model and get the analysis of variance table
mod <- aovGeo(ols, cutoff = 0.6)
# Tukey's HSD
spTukey(mod)