t_p: Generalized Capture-Recapture Estimator, Extension of Pollock...

Description Usage Arguments Details Value Examples

View source: R/t_p.R

Description

Make an Estimate of Total Using Pollock et al's (1994) Estimator Generalized by Liu et al (2017) for a Complex Sample Setting. Use number of capture units as auxiliary information

Usage

1
2
t_p(data, recapture_total, captured, survey_design, na_remove = T,
  capture_units)

Arguments

data

A data frame, each row is an observation from the recapture sample, containing information gathered in the recapture sample, whether or not the unit is also in the capture sample, and sample design information.

recapture_total

Name of variable of interest recorded in the recapture sample, from given data frame

captured

Name of indicator variable of the sampled unit also being in the capture sample, from given data frame

survey_design

A complex survey design specified with survey::svydesign()

na_remove

Remove NA's? Logical

capture_units

Total number of units in the capture sample

Details

This estimator is a ratio estimator defined by: t_p = n_1 \frac{\hat{t}_y}{\hat{n}_1} with ratio t_y / n_1. \hat{t}_y = ∑{i=1}^{N}w_i z_i y_i where z_i is a sampling indicator, w_i is the sampling weight, and y_i is the value of the variable of interest observed in the recapture sample. There are N units in the population. n_1 is the total number of units seen in the capture sample and is estimated by \hat{n}_1 = ∑{i=1}^{N}w_i z_i r_i where r_i is an indicator of whether the unit is a member of the recapture sample was seen in the capture sample.

Value

Estimate of Total and Standard Error of Estimate

total

Estimate of total of a variable in population

se

Standard error of estimate of total

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
  s_design <- survey::svydesign(id = ~psu,
                               strat = ~stratum,
                               prob = ~prob,
                               nest = T,
                               data = red_snapper_sampled)

  t_p(data = red_snapper_sampled,
      recapture_total = number_caught_ps,
      captured = captured_indicator,
      survey_design = s_design,
      capture_units = nrow(self_reports))

williamsbenjamin/blendR documentation built on March 18, 2021, 4:07 a.m.