-
Notifications
You must be signed in to change notification settings - Fork 1
/
Test presentation.Rmd
168 lines (126 loc) · 4.31 KB
/
Test presentation.Rmd
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
---
title: "Marcuson - Technical Presentation"
author: "Christopher Martin"
date: "`r Sys.Date()`"
output: powerpoint_presentation
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = F)
library(knitr)
```
# Introduction
The aim of this report is to detail to extensions made to the R package dsims through the inclusion of density surface modelling (dsm) simulations.
# Plot sampling
```{r crop = TRUE, fig.show='hold', out.width='50%'}
plot_crop(include_graphics(paste0(getwd(),'/Reports/Plots/Plot sampling example.jpg')))
```
# Distance sampling
- Line transects
- Point transects
# Line transects
```{r crop = TRUE, fig.show='hold', out.width='50%'}
plot_crop(include_graphics(paste0(getwd(),'/Reports/Plots/DS line example.jpg')))
```
# Line transects - Detection function
```{r crop = TRUE, fig.show='hold', out.width='50%'}
plot_crop(include_graphics(paste0(getwd(),'/Reports/Plots/DS detect.jpg')))
```
# Density surface modelling
- 1 or 2 stage approaches
- Count per segment model
$$ \mathbb{E}(n_j) = \hat{p_j}A_jexp[ \, \beta_0 + \sum_k f_k(z_{jk} ) ]\,$$
# Simulation profile
- Region and design specification.
- Prediction grid generated.
- For each run of the simulation:
- - run a survey
- - coerce survey data into correct format
- - fit a distance sampling model
- - fit a density surface model
- - extract results
# Region and design specification
- Region profile
- Point or Line transect options.
- Construct density surface
- Describe population
- Define detection function
# Region and Density Surface
```{r crop = TRUE, fig.show='hold', out.width='50%'}
plot_crop(include_graphics(paste0(getwd(),'/Reports/Plots/NS region.jpg')))
plot_crop(include_graphics(paste0(getwd(),'/Reports/Plots/North_Sea_density.jpg')))
```
# Example survey designs
```{r fig.show = 'hold', out.width='33%'}
knitr::include_graphics(paste0(getwd(),'/Reports/Plots/North Sea survey point.jpg'))
knitr::include_graphics(paste0(getwd(),'/Reports/Plots/North Sea survey line.jpg'))
knitr::include_graphics(paste0(getwd(),'/Reports/Plots/North Sea survey zigzag.jpg'))
```
# Prediction Grid Generation
```{r fig.show = 'hold', out.width='33%'}
include_graphics(paste0(getwd(),'/Reports/Plots/Prediction grid.jpg'))
```
# Survey
```{r fig.show = 'hold', out.width='33%'}
include_graphics(paste0(getwd(),'/Reports/Plots/Montrave examp survey.jpg'))
```
# Data coercion
- transects into segments
- link observations to segments
# Fit Distance sampling model
- ds(
- - survey$dist.data,
- - truncation = design.trunc,
- - transect = transect.type,
- - formula = ~1,
- - key = key.function,
- - adjustment = NULL)
# Fit DSM model
- dsm(
- - count ~ s(x, y, k = sum(transects),
- - ddf.obj = ds.mod,
- - segment.data = segdata,
- - segment.area = segdata$Area,
- - observation.data = obsdata,
- - family = tw(),
- - transect = transect.type)
# Results - Point transect
```{r fig.show = 'hold', out.width='50%'}
Mont.rand <- read.csv('Estimates/Montrave5000linerandom.csv')
hist(Mont.rand$dsm.est,breaks = 50,
main = 'Histogram of DSM estimates',
xlab = 'DSM Abundance estimates')
abline(v = mean(Mont.rand$dsm.est), col = 'red')
hist(Mont.rand$ds.est,breaks = 50,
main = 'Histogram of DS estimates',
xlab = 'DS Abundance estimates')
abline(v = mean(Mont.rand$ds.est), col = 'red')
```
# Results - Point transects
# Results - Parallel Line
```{r fig.show = 'hold', out.width='50%'}
Mont.para <- read.csv('Estimates/Montrave5000lineparallel.csv')
hist(Mont.para$dsm.est,breaks = 50,
main = 'Histogram of DSM estimates',
xlab = 'DSM Abundance estimates')
abline(v = mean(Mont.para$dsm.est), col = 'red')
hist(Mont.para$ds.est,breaks = 50,
main = 'Histogram of DS estimates',
xlab = 'DS Abundance estimates')
abline(v = mean(Mont.para$ds.est), col = 'red')
```
# Results - Parallel Line
# Results - Zigzag Line
```{r fig.show = 'hold', out.width='50%'}
Mont.zig <- read.csv('Estimates/Montrave5000linezigzag.csv')
hist(Mont.zig$dsm.est,breaks = 50,
main = 'Histogram of DSM estimates',
xlab = 'DSM Abundance estimates')
abline(v = mean(Mont.zig$dsm.est), col = 'red')
hist(Mont.zig$ds.est,breaks = 50,
main = 'Histogram of DS estimates',
xlab = 'DS Abundance estimates')
abline(v = mean(Mont.zig$ds.est), col = 'red')
```
# Results - Zigzag Line
# Further investigations
# Conclusions