I am quite new to the area of spatial statistics, but I'm very interested. For learning and demo purposes, I've created three datsets.
Dataset - Persons: This describes individuals at a certain location with a few variables. Please note, that the persons are located in the provided cities. A short explanation:
- POINT_X: X-coordinate of city.
- POINT_Y: Y-coordinate of city.
- city: The name of the city, where they live.
- ill: "1" states that they are ill. For learning purposes, all persons are ill.
- job: If they have a job or not. "1" means: they have one, "0" means they haven't got one.
- disnw: The distance to the nearest waterpoint.
- wID: not relevant.
Dataset - City: This describes a number of cities including some variables. A short explanation of these:
- city: The name of the city.
- population: The population of the city.
- POINT_X: X-coordinate of city.
- POINT_Y: Y-coordinate of city.
- ill: Number of ill persons in the city.
- notill: Number of healthy persons in the city.
- disnw: The distance (in km) to the nearest waterfeature.
- wID: not relevant
- rate_ill: The rate of ill persons in the city.
- rate_notill: The rate of healthy persons in the city.
Dataset - Waterfeatures: . Please note that the viallages are on the same location as persons. This is a collection of spatial points, which describes waterfeatures.
- POINT_X: X-coordinate of a waterfeature.
- POINT_Y: Y-coordinate of a waterfeature.
geographic overview about the setting (red are persons, blue are waterfeatures, yellow are cities)
Now I want to check the hypothesis that cities, which are nearer to waterfeatures (so where the variable disnw is lower), have a higher number of ill persons. So is there a correlation between the number of ill persons(no_ill
)/rate of ill (rate_ill
) and the proximity to water features (disnw
). I know, that the datasets are possibly not representative or suitable for my hyptothesis, but for now this fact shouldn't matter.
I've already looked at some functions and packages, but I'm very unsure about a suitable method. Methods, which might be useful (at least from my point of view): semivariogram, variogram, Ripley's K function, G-Function, correlation coefficient.
To give you a better overview, I've created example datasets. You can find these here:
persons = read.csv("http://pastebin.com/raw.php?i=3aMGi9Ax", header = TRUE, stringsAsFactors=FALSE)
city = read.csv("http://pastebin.com/raw.php?i=Lk3KXLQT", header = TRUE, stringsAsFactors=FALSE)
water = read.csv("http://pastebin.com/raw.php?i=hQRvMZwE", header = TRUE, stringsAsFactors=FALSE)
It would be awesome to get some input from your side. Maybe you have a tip, how to perform this kind of analysis.
Thanks in advance!