Description Usage Arguments Details Value References Examples

View source: R/modified.ttest.R

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

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

`x` |
an |

`y` |
an |

`coords` |
an |

`nclass` |
a single number giving the number of cells for Moran's index.
The default is 13. If this argument is |

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.

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) |

`dof` |
the estimated degrees of freedom for the |

`p.value` |
the |

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

`card` |
number of elements in each interval generated to compute Moran's |

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

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.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | ```
# 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)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.