-
Notifications
You must be signed in to change notification settings - Fork 0
/
Analyses.Rmd
88 lines (73 loc) · 2.93 KB
/
Analyses.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
---
title: "Dynamic Occupancy Model with Detection Probability and Misclassifications"
author: "Brian W. Rolek"
knit: (function(input_file, encoding) {
out_dir <- 'docs';
rmarkdown::render(input_file,
encoding=encoding,
output_file=file.path(dirname(input_file), out_dir, 'index.html'))})
date: "30 May 2023"
output:
html_document:
df_print: paged
toc: yes
github_document:
toc: yes
---
<style type="text/css">
body{
font-size: 14pt;
}
</style>
Contact author: brianrolek at gmail.com.
Supplemental materials for:
Larned, A. F., B. W. Rolek, K. Silaphone, S. Pruett, R. Bowman, B. Lohr. 2023. Habitat use and dynamics of an Endangered passerine, the Florida Grasshopper Sparrow (Ammodramus savannarum floridanus), after prescribed fires.
GitHub repository located online at https://github.com/BrianRolek/Misclassification-models
and archived here:
DOI:10.5281/zenodo.7987218
We used dynamic occupancy models that accounted for misclassifications and detection probability. We implemented Models in R and Bayesian software NIMBLE.
# 1. Metadata
Metadata associated with the file "data\data-final.Rdata". Once loaded into R, this file contains the object "dat.conv", a list containing data for input into the JAGS model. Data fields include:
+ Y = Observed states: 1 = no detection, 2 = uncertain detection, 3 = certain detection. A matrix of dimensions nsite x nvisit x nyear.
+ nsite = The number of sites surveyed at Avon Park and retained for analyses.
+ nvisit = The maximum number of survey visits within breeding seasons.
+ nyear = The total number of years of surveys.
+ date = The date during each survey visit. A matrix of dimensions nsite x nvisit x nyear.
+ hr = Time after civil dawn during the start of each survey visit. A matrix of dimensions nsite x nvisit x nyear.
# 2. Basic Model Without Covariates
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//01-misclass_basic.R')
```
```{r, basic, eval=FALSE}
```
# 3. Global Detection Model Including All Covariates for Detection
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//02-misclass_global_detection.R')
```
```{r, global detection, eval=FALSE}
```
# 4. Bayesian latent indicator scale selection (BLISS) to Select Spatial Scales and Summary Statistics of Covariates
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//03-misclass_BLISS.R')
```
```{r, BLISS, eval=FALSE}
```
# 5. Gibb's Variable Selection (GVS)
## 5.1. Calculate Prior Probabilities (step 1)
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//04-model-probs-for-priors-GVS_step1.R')
```
```{r, prior probs, eval=FALSE}
```
## 5.2 Run Global Model to Obtain Estimates for Pseudopriors (step 2)
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//05-misclass_GVS_step2.R')
```
```{r, global model, eval=FALSE}
```
## 5.3 Run Model with GVS (step 3)
```{r, include=FALSE, cache=FALSE}
knitr::read_chunk('R//06-misclass_GVS_step3.R')
```
```{r, gibbs variable selection, eval=FALSE}
```