LP_for_rev_fit | R Documentation |
EXPERIMENTAL. This will take a data frame of capture histories, frequencies, and additional covariates (e.g., strata and/or continuous covariates) for a simple forward Petersen estimate plus estimates of escapement and associated stock proportions with SE for backwards estimation. DO NOT USE YET.
LP_for_rev_fit(
data,
E,
E.SE,
G,
G.SE,
min.G = 0.01,
n.boot = 100,
trace = FALSE
)
data |
Data frame containing the variables:
plus any other covariates (e.g. discrete strata and/or continuous covariates) to be used in the model fitting. |
E |
Escapement at one or more terminal areas. E, E.SE, G, G.SE must all have the same length |
E.SE |
SE of the estimates of escapement |
G |
Estimated proportion of the stock at the first capture location estimated using GSI and other methods |
G.SE |
SE of the estimated stock proportion. |
min.G |
Miniumum acceptable stock proportion during the bootstrap estimation of uncertainty |
n.boot |
Number of bootstrap samples used to estimate the uncertainty |
trace |
Should intermediate tracing be enabled (e.g. browser() stops) |
The frequency variable (freq
in the data
argument) is the number of animals with the corresponding capture history.
Capture histories (cap_hist
in the data
argument) are character values of length 2.
10 Animals tagged but never seen again.
11 Animals tagged and recaptured and tag present at event 2.
01 Animals captured at event 2 that appear to be untagged.
A pseudo-likelihood is constructed consisting of the usual likelihood for a forward capture recapture and marginal likelihoods for each of the escapement (E) and stock proportions (G) point estimates. I have not integrated over the uncertainty in G and E.
An list object of class LP_for_rev_est with abundance estimates and measures of uncertainty
summary A data frame with the pseudo-likelihood value, abundance estimates and SE
data A data frame with the raw data used in the fit
fit Results of the fit from the optimizer
datetime Date and time the fit was done
Unlike other routine, it is not necessary to use a XX_est() function to get estimates of abundance.
Schwarz, C. J. cschwarz.stat.sfu.ca@gmail.com.
# Example of combined forward and reverse MR
# get some data
n1 <- 500
n2 <- 1500
m2 <- 150
f.data <- data.frame(cap_hist=c("10","11","01"), freq=c(n1 - m2, m2, n2 - m2))
f.data
E = 1500
E.SE = 150
G = .2
G.SE = .05
res <- LP_for_rev_fit(data=f.data,
E=E,
E.SE=E.SE,
G=G,
G.SE=G.SE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.