SpatialPack (version 0.3-8196)

modified.ttest: Modified t test

Description

Performs a modified version of the t test to assess the correlation between two spatial processes.

Usage

modified.ttest(x, y, coords, nclass = 13)

Arguments

x

an n-dimensional vector of data values.

y

an n-dimensional vector of data values.

coords

an n-by-2 matrix containing coordinates of the n data locations in each row.

nclass

a single number giving the number of cells for Moran's index. The default is 13. If this argument is NULL Sturges' formula us used.

Value

A list with class "mod.ttest" containing the following components:

corr

the sample correlation coefficient.

ESS

the estimated effective sample size.

Fstat

the value of the (unscaled) F-statistic.

dof

the estimated degrees of freedom for the F-statistic.

p.value

the p-value for the test.

upper.bounds

upper bounds of the intervals constructed to compute Moran's I.

card

number of elements in each interval generated to compute Moran's I.

imoran

a matrix containing Moran's index for each interval associated with both variables.

The generic functions print and summary are used to obtain and print additional details about the modified t test.

Details

The methodology implemented is a modified t test of spatial association based on the work of Clifford and Richardson (1989). The test is based on corrections of the sample correlation coefficient between the two spatially correlated sequences and required the estimation of an effective sample size. This factor takes into account the spatial association of both processes.

References

Clifford, P., Richardson, S., Hemon, D. (1989). Assessing the significance of the correlation between two spatial processes. Biometrics 45, 123--134.

Dutilleul, P. (1993). Modifying the t test for assessing the correlation between two spatial processes. Biometrics 49, 305--314.

Examples

Run this code
# NOT RUN {
# Murray Smelter site dataset
data(murray)

# defining the arsenic (As) and lead (Pb) variables from the murray dataset
x <- murray$As
y <- murray$Pb

# extracting the coordinates from Murray dataset
coords <- murray[c("xpos","ypos")]

# computing the modified t-test of spatial association
z <- modified.ttest(x, y, coords)
z

# display the upper bounds, cardinality and the computed Moran's index
summary(z)
# }

Run the code above in your browser using DataCamp Workspace