t_c: Generalized Capture-Recapture Estimator of Total for Complex...

Description Usage Arguments Details Value Examples

View source: R/t_c.R

Description

Make an Estimate of Total Using a Generalized Capture-Recapture Estimator from Liu et al (2017) for a Complex Sample Setting. Uses total of variable of interest from the capture sample as auxiliary information.

Usage

1
2
t_c(data, recapture_total, captured_total, survey_design, na_remove = TRUE,
  total_from_capture)

Arguments

data

A data frame, each row is an observation from the recapture sample. If the row refers to a unit which is also in the capture sample, the data frame contains the information gathered from the recapture sample. If the row refers to a unit in the recapture sample only, those columns for recapture sample data contain zeros. The data frame also should contain sample design information.

recapture_total

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

captured_total

Name of variable of interest as Recorded in Capture Sample, from given data frame. captured_total = 0 if unit is in the Recapture Sample Only

survey_design

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

na_remove

Remove NA's? Logical

total_from_capture

Total of Variable of Interest from all Units in the Capture Sample

Details

This estimator is a ratio estimator defined by: t_c = t_y* \frac{\hat{t}_y}{\hat{t}_y*} with ratio t_y / t_y*. \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. y*_i is the value of the variable of interest recorded in the recapture sample. t_y* = ∑{i =1}^{N}r_iy*_i r_i is an indicator of whether the unit is a member of the recapture sample.

Value

Estimate of Total and Standard Error of Estimate

total

Estimate of total of variable of interest in population

se

Standard error of estimate of total

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
  s_design <- survey::svydesign(id = ~psu,
                               strat = ~stratum,
                               prob = ~prob,
                               nest = T,
                               data = red_snapper_sampled)
  t_c(data = red_snapper_sampled,
      recapture_total = number_caught_ps,
      captured_total = number_caught_np,
      survey_design = s_design,
      total_from_capture = sum(self_reports$number_kept))

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