Skip to content

Commit

Permalink
Merge pull request #43 from poissonconsulting/b-vignette
Browse files Browse the repository at this point in the history
Correct links etc.
  • Loading branch information
nehill197 authored Nov 21, 2024
2 parents cf44ade + 603cf7a commit 2b46dac
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
1 change: 0 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,3 @@ Encoding: UTF-8
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.2
Config/Needs/website: rmarkdown
6 changes: 3 additions & 3 deletions vignettes/bisonpic-methods.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ To ensure the model relates correctly to the day the census estimate was complet

The census data was incorporated using a normal distribution as follows,

\[C_a \sim \text{Normal} \biggl( \sum_{j=1}^J \mathbf{n}_{j,a}, \sigma_{C_a} \biggr) \space T[0, ]\]
\[C_a \sim \text{Normal} \biggl( \sum_{j=1}^J \mathbf{n}_{j,a}, \sigma_{C_a} \biggr) \text{ T[0, ]}\]

where $C_a$ is the census estimate in the $a^{th}$ aerial survey, $\sum_{j=1}^J \mathbf{n}_{j,a}$ is the total expected abundance on the day of the $a^{th}$ study year, and $\sigma_{C_a}$ is the standard deviation of the census estimate (calculated as the product of the census estimate $C_a$ and its associated CV).
The normal distribution is lower-truncated at 0 to ensure that the abundance estimates remain positive.
Expand All @@ -307,7 +307,7 @@ The normal distribution is lower-truncated at 0 to ensure that the abundance est

The data on the proportion of calves in the herd was incorporated similarly,

\[P_a \sim \text{Normal}(p_{F0,a} + p_{M0,a}, \sigma_{P_a}) \space T[0, 1]\]
\[P_a \sim \text{Normal}(p_{F0,a} + p_{M0,a}, \sigma_{P_a}) \text{ T[0, 1]}\]

where $P_a$ is the proportion of calves estimate in the $a^{th}$ aerial survey, $p_{F0,a} + p_{M0,a}$ is the expected proportion of calves on the day of the $a^{th}$ aerial survey, and $\sigma_{P_a}$ is the standard deviation in the estimate of the proportion of calves (calculated as the product of the proportion of calves estimate $P_a$ and its associated CV).
The normal distribution is truncated at 0 and 1 to ensure that the estimates remain on the probability scale.
Expand All @@ -316,7 +316,7 @@ The normal distribution is truncated at 0 and 1 to ensure that the estimates rem

The model is fitted in Stan [@carpenter_stan_2017].
By default, [`bisonpictools`](https://github.com/poissonconsulting/bisonpictools) uses "report" mode and a thinning rate of 10 to save 500 MCMC samples from each of three chains (after discarding the first halves).
To aid with debugging, other analysis modes ("debug" and "quick") can be set (see the [user guide](https://poissonconsulting.github.io/bisonpictools/user-guide.html) for more detail).
To aid with debugging, other analysis modes ("debug" and "quick") can be set (see the [user guide](https://poissonconsulting.github.io/bisonpicsuite/articles/bisonpic-user-guide.html) for more detail).
The user can increment the thinning rate as required to achieve convergence.
The model-fitting process is automated in the [`runbisonpic`](https://github.com/poissonconsulting/runbisonpic) Shiny app.

Expand Down
10 changes: 5 additions & 5 deletions vignettes/bisonpictools-getting-started.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ Other packages in this suite include:

## Getting Help

To get additional information on a particular function just type `?` followed by the name of the function in the R console. For example, ?bpt_analyse brings up the R documentation for the `bisonpictools` analysis function.
To get additional information on a particular function just type `?` followed by the name of the function in the R console. For example, `?bpt_analyse()` brings up the R documentation for the `bisonpictools` analysis function.

For more information on using R the reader is referred to [R for Data Science](https://r4ds.had.co.nz/) [@wickham_r_2016].

If you discover a bug in `bisonpictools` please file an [issue](https://github.com/poissonconsulting/bisonpictools/issues) with a [reprex](https://reprex.tidyverse.org/) (reproducible example).

## Data

The easiest way to prepare the data for use with the `bisonpictools` functions is to download the templated excel spreadsheet from the [shinybisonpic website](https://poissonconsulting.shinyapps.io/shinybisonpic-dev).
The easiest way to prepare the data for use with the `bisonpictools` functions is to download the templated excel spreadsheet from the [shinybisonpic website](https://poissonconsulting.shinyapps.io/shinybisonpic/).
Click the **Download Template** button, and populate each sheet with your data.

- `event_data` contains the camera trap event data, including the date and time of each event, location of the camera trap, and the number of individuals in each class
Expand Down Expand Up @@ -148,8 +148,8 @@ bpt_plot_ratios(

### `shinybisonpic`

The [`shinybisonpic` Shiny app](https://poissonconsulting.shinyapps.io/shinybisonpic-dev/) can be used to explore the locations of camera traps and the the ratios of different classes of wood bison in camera trap observations in a user-friendly manner.
Refer to the [user guide](https://poissonconsulting.github.io/bisonpicsuite/bisonpic-user-guide.html) for more information on how to use the `shinybisonpic` app.
The [`shinybisonpic` Shiny app](https://poissonconsulting.shinyapps.io/shinybisonpic) can be used to explore the locations of camera traps and the the ratios of different classes of wood bison in camera trap observations in a user-friendly manner.
Refer to the [user guide](https://poissonconsulting.github.io/bisonpicsuite/articles/bisonpic-user-guide.html) for more information on how to use the `shinybisonpic` app.

## Data Analysis

Expand Down Expand Up @@ -350,7 +350,7 @@ remotes::install_github("poissonconsulting/runbisonpic")
runbisonpic::launch_runbisonpic()
```

See the [user guide](https://poissonconsulting.github.io/bisonpicsuite/bisonpic-user-guide.html) for more guidance on how to use the `runbisonpic` app.
See the [user guide](https://poissonconsulting.github.io/bisonpicsuite/articles/bisonpic-user-guide.html) for more guidance on how to use the `runbisonpic` app.

## Going beyond `bisonpictools`

Expand Down

0 comments on commit 2b46dac

Please sign in to comment.