t_diff: Difference Estimator of Total

Description Usage Arguments Details Value Examples

View source: R/t_diff.R

Description

Make an estimate of total using a difference estimator proposed by Breidt et al (2018). The estimator assumes the sampling frame is complete, and there is no undercoverage.

Usage

1
t_diff(data, delta, survey_design, na_remove = T, 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 only in the recapture sample, those columns for recapture sample data contain zeros. The data frame should contain a variable delta, see below, and and sample design information.

delta

Name of variable from given data frame. For every unit in the recapture sample, delta is the value of the variable of interest observed in the recapture sample minus the value observed in the capture sample. If the unit in the recapture sample is not also a member of the capture sample, delta =0

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 difference estimator defined by: t_{diff} = t_y* + (\hat{t}_y - \hat{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_diff(data = red_snapper_sampled,
      delta = delta_catch,
      survey_design = s_design,
      na_remove = TRUE,
      total_from_capture = sum(self_reports$number_kept))

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