sar_crd: Using a SAR model to handle spatial dependence in a...

Description Usage Arguments Value References Examples

View source: R/sar_crd.R

Description

Fit a completely randomized design when the experimental units have some degree of spatial dependence using a Spatial Lag Model (SAR).

Usage

1
sar_crd(resp, treat, coord, seq.radius = NULL)

Arguments

resp

Numeric or complex vector containing the values of response variable.

treat

Numeric or complex vector containing the treatment applied to each experimental unit.

coord

Matrix of point coordinates or a SpatialPoints Object.

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.

Value

sar_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.

Fc

F statistic calculated for treatment.

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.

treat

vector of treatment applied to each experimental unit.

modelAdj

model of class aov using the adjusted response.

namey

response variable name.

namex

treatment variable name.

modelstd

data frame containing the ANOVA table using non-adjusted response.

References

Long, D. S. "Spatial statistics for analysis of variance of agronomic field trials." Practical handbook of spatial statistics. CRC Press, Boca Raton, FL (1996): 251-278.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
data("carrancas")
resp <- carrancas$DAP16
treat <- carrancas$T
coord <- cbind(carrancas$X, carrancas$Y)
cv<-sar_crd(resp, treat, coord, seq.radius)
cv

#Summary for class SARanova
summary(cv)

#Anova for class SARanova
anova(cv)

#Test based on multivariate t-student distribution
spMVT(cv)

#Tukey's test
spTukey(cv)

#Scott-Knott test
spScottKnott(cv)


## End(Not run)

lrcastro/spANOVA documentation built on Nov. 23, 2018, 4:37 a.m.