Title: | Model-Based Estimation of Northern Fur Seal Pup Production |
---|---|
Description: | Provide a set of models for estimation of northern fur seal pup production. |
Authors: | Devin S. Johnson |
Maintainer: | Devin S. Johnson <[email protected]> |
License: | CC0 |
Version: | 0.0.1 |
Built: | 2024-10-26 02:38:44 UTC |
Source: | https://github.com/dsjohnson/pupR |
Mark-resight models for estimation of northern fur seal pup abundance.
Package: | pupR |
Type: | Package |
Version: | 0.0.1 |
Date: | February 27, 2017 |
License: | CC0 |
LazyLoad: | yes |
This software package is developed and maintained by scientists at the NOAA Fisheries Alaska Fisheries Science Center and should be considered a fundamental research communication. The reccomendations and conclusions presented here are those of the authors and this software should not be construed as official communication by NMFS, NOAA, or the U.S. Dept. of Commerce. In addition, reference to trade names does not imply endorsement by the National Marine Fisheries Service, NOAA. While the best efforts have been made to insure the highest quality, tools such as this are under constant development and are subject to change.
Devin S. Johnson
Maintainer: Devin S. Johnson <[email protected]>
A binomial pdf that handles a noninteger 'size' argument.
dbinom2(x, size, prob, log = FALSE)
dbinom2(x, size, prob, log = FALSE)
x |
vector of quantiles |
size |
number of trials (zero or more). Unlike base 'dbinom' doesn't have to be an integer |
prob |
probability of success on each trial |
log |
logical; if TRUE, probabilities p are given as log(p) |
Devin S. Johnson
Fit the observer by occasion model using maximum likelihood. The parameters, covariance matrix, and log-likelihood are returned in a list.
fit_oo(data, M, start_val = NULL, refit = TRUE, ...)
fit_oo(data, M, start_val = NULL, refit = TRUE, ...)
data |
A data frame containing the resight information. The data must contain the columns (1) 'obs'– the categorical name of the observer. (2) 'resample'– a variable indicating the resample occasion (3) 'm'– the counts of marked pups by each observer (4) 'u'– the counts of unmarked pups |
M |
the total number of unmarked pups in the population |
start_val |
an optional vector of starting values for the model |
refit |
logical. should the function attempt a refit to help ensure global optimum is reached |
... |
holding space for any other variable supplied, these will be ignored |
Uses SIR methodology to draw a sample from the posterior distribution. A MVN proposal is used based on the MLE list output of the model fitting function
get_IS_sample(fit, data, M, res = 5000, initial = 10000, ...)
get_IS_sample(fit, data, M, res = 5000, initial = 10000, ...)
fit |
A list produced by ‘fit_oo’ function |
data |
The resampling data |
M |
the total number of pups shear marked |
res |
the size of the resample |
initial |
size of the initial sample from the MVN proposal |
... |
holding space for any other variable supplied, these will be ignored |
calculate log-likelihood for the observer by occassion model
ln_lik_oo(par, M, u, m)
ln_lik_oo(par, M, u, m)
par |
parameter vector |
M |
Number of marks distributed |
u |
vector on unmarked animals counted by each observer on each occasion |
m |
vector on marked animals counted by each observer on each occasion |
Devin S. Johnson
Load the 2016 shearing data into the global workspace.
load_demo_data()
load_demo_data()
This function allows users to access a full step-by-step guide for using 'pupR' and other packages in the R statistical environment for estimating northern fur seal pup production.
see_demo()
see_demo()
Show the location of the installed raw data .csv files for the 2016 shearing season
show_data_loc()
show_data_loc()
Here we summarize the posterior sample into a table for each rookery
summarize_oo(SIR, M, ...)
summarize_oo(SIR, M, ...)
SIR |
a matrix of posterior samples from the ‘get_IS_sample’ function |
M |
total number of sheared pups |
... |
holding space for any other variable supplied, these will be ignored |