aovSar.crd {spANOVA} | R Documentation |
Using a SAR model to handle spatial dependence in a Completely Randomized Design
Description
Fit a completely randomized design when the experimental units have some degree of spatial dependence using a Spatial Lag Model (SAR).
Usage
aovSar.crd(resp, treat, coord, seq.radius)
Arguments
resp |
Numeric or complex vector containing the values of the response variable. |
treat |
Numeric or complex vector containing the treatment applied to each experimental unit. |
coord |
Matrix of point coordinates. |
seq.radius |
Complex vector containing a radii sequence used to set the neighborhood pattern. The default sequence has ten numbers from 0 to half of the maximum distance between the samples, if no sample is found in this interval the sequence upper limit is increased by 10% and so on. |
Details
Three assumptions are made about the error in the analysis of variance (ANOVA):
1. the errors are normally distributed and, on average, zero;
2. the errors all have the same variance (they are homoscedastic), and
3. the errors are unrelated to each other (they are independent across observations).
When these assumptions are not satisfied, data transformations in the response variable are often used to circumvent this problem. For example, in absence of normality, the Box-Cox transformation can be used.
However, in many experiments, especially field trials, there is a type of correlation generated by the sample locations known as spatial correlation, and this condition violates the independence assumption. errors are spatially correlated, by using a data transformation discussed in Long (1996)
Y_{adj} = Y - (\hat{\rho}WY - \hat{\rho}\beta_0),
where \hat{\rho}
denotes the autoregressive spatial parameter of the SAR model
estimated by lagsarlm, \beta_0
is the overall mean and W
is
a spatial neighborhood matrix which neighbors are defined as the samples located within
a radius, this radius is specified as a sequence in seq.radius
. For each radius
in seq.radius
the model is computed as well its AIC, then the radius chosen is the
one that minimizes AIC.
The aim of this transformation is converting autocorrelated observations into non-correlated observations in order to apply the analysis of variance and obtain suitable inferences.
Value
aovSar.crd
returns an object of class
"SARanova".
The functions summary
and anova are used to obtain and print a summary
and analysis of variance table of the results.
An object of class "SARanova" is a list containing the following components:
DF |
degrees of freedom of rho, treatments, residual and total. |
SS |
sum of squares of rho, treatments and residual. |
MS |
mean square of rho, treatments and residual. |
Fc |
F statistic calculated for treatment. |
residuals |
residuals of the adjusted model. |
p.value |
p-value associated to F statistic for treatment. |
rho |
the autoregressive parameter. |
Par |
data.frame with the radius tested and its AIC. |
y_orig |
vector of response. |
y_ajus |
vector of adjusted response. |
treat |
vector of treatment applied to each experimental unit. |
modelAdj |
model of class |
modelstd |
data frame containing the ANOVA table using non-adjusted response. |
namey |
response variable name. |
namex |
treatment variable name. |
References
Long, D.S., 1996. Spatial statistics for analysis of variance of agronomic field trials. In: Arlinghaus, S.L. (Ed.), Practical Handbook of Spatial Statistics. CRC Press, Boca Raton, FL, pp. 251–278.
Rossoni, D. F.; Lima, R. R. . Autoregressive analysis of variance for experiments with spatial dependence between plots: a simulation study. Revista Brasileira de Biometria, 2019.
Scolforo, Henrique Ferraço, et al. "Autoregressive spatial analysis and individual tree modeling as strategies for the management of Eremanthus erythropappus." Journal of forestry research 27.3 (2016): 595-603.
Examples
data("crd_simulated")
resp <- crd_simulated$y
treat <- crd_simulated$trat
coord <- cbind(crd_simulated$coordX, crd_simulated$coordY)
cv <- aovSar.crd(resp, treat, coord)
#Summary for class SARanova
summary(cv)
#Anova for class SARanova
anova(cv)