-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy path17-Activity-Point-Pattern-Analysis-V.Rmd
More file actions
80 lines (53 loc) · 3.13 KB
/
17-Activity-Point-Pattern-Analysis-V.Rmd
File metadata and controls
80 lines (53 loc) · 3.13 KB
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
---
title: "Activity 8: Point Pattern Analysis V"
output: html_notebook
---
# Activity 8: Point Pattern Analysis V
Remember, you can download the source file for this activity from [here](https://github.com/paezha/Spatial-Statistics-Course).
## Practice questions
Answer the following questions:
1. Describe the process to use simulation for hypothesis testing
2. Why is the selection of an appropriate region critical for the analysis of point patterns?
3. Discuss the issues associated with the edges of a region.
4. What is a sampled point pattern?
## Learning objectives
In this activity, you will:
1. Explore a dataset using single scale distance-based techniques.
2. Explore the characteristics of a point pattern at multiple scales.
3. Discuss ways to evaluate how confident you are that a pattern is random.
## Suggested reading
O'Sullivan D and Unwin D (2010) Geographic Information Analysis, 2nd Edition, Chapter 5. John Wiley & Sons: New Jersey.
## Preliminaries
For this activity you will need the following:
* An R markdown notebook version of this document (the source file).
* A package called `geog4ga3`.
It is good practice to clear the working space to make sure that you do not have extraneous items there when you begin your work. The command in R to clear the workspace is `rm` (for "remove"), followed by a list of items to be removed. To clear the workspace from _all_ objects, do the following:
```{r}
rm(list = ls())
```
Note that `ls()` lists all objects currently on the workspace.
Load the libraries you will use in this activity. In addition to `tidyverse`, you will need `spatstat`, a package designed for the analysis of point patterns (you can learn about `spatstat` [here](https://cran.r-project.org/web/packages/spatstat/vignettes/getstart.pdf) and [here](http://spatstat.org/resources/spatstatJSSpaper.pdf)):
```{r message=FALSE}
library(tidyverse)
library(spatstat)
library(geog4ga3)
```
Load a dataset of your choice. It could be one of the datasets that we have used before (Toronto Business Points, Bear GPS Locations), or one of the datasets included with the package `spatstat`. To see what datasets are available through the package, do the following:
```{r}
vcdExtra::datasets("spatstat.data")
```
Load a dataset of your choice.
You can do this by using the `load()` function if the dataset is in your drive (e.g., the GPS coordinates of the bear).
On the other hand, if the dataset is included with the `spatstat` package you can do the following, for example to load the `gorillas` dataset:
```{r}
gorillas.ppp <- gorillas
```
As usual, you can check the object by means of the `summary` function:
```{r}
summary(gorillas.ppp)
```
## Activity
1. Partner with a fellow student to analyze the chosen dataset.
2. Discuss whether the pattern is random, and how confident you are in your decision.
3. The analysis of the pattern is meant to provide insights about the underlying process. Create a hypothesis using the data generated and can you answer that hypothesis using the plots generated?
4. Discuss the limitations of the analysis, for instance, choice of modeling parameters (size of region, kernel bandwidths, edge effects, etc.)