redoPopEstimation {singleRcapture}R Documentation

Updating population size estimation results.

Description

A function that applies all post-hoc procedures that were taken (such as heteroscedastic consistent covariance matrix estimation or bias reduction) to population size estimation and standard error estimation.

Usage

redoPopEstimation(object, newdata, ...)

## S3 method for class 'singleRStaticCountData'
redoPopEstimation(
  object,
  newdata,
  cov,
  weights,
  coef,
  control,
  popVar,
  offset,
  weightsAsCounts,
  ...
)

Arguments

object

object for which update of population size estimation results will be done.

newdata

optional data.frame with new data for pop size estimation.

...

additional optional arguments, currently not used in singleRStaticCountData class method.

cov

an updated covariance matrix estimate.

weights

optional vector of weights to use in population size estimation.

coef

optional vector of coefficients of regression on which to base population size estimation. If missing it is set to coef(object).

control

similar to controlPopVar in estimatePopsize(). If missing set to controls provided on call to object.

popVar

similar to popVar in estimatePopsize(). If missing set to "analytic".

offset

offset argument for new data

weightsAsCounts

for singleRStaticCountData method used to specify whether weights should be treated as number of occurrences for rows in data

Details

Any non specified arguments will be inferred from the object

Value

An object of class popSizeEstResults containing updated population size estimation results.

Examples

# Create simple model
Model <- estimatePopsize(
  formula = capture ~ nation + gender, 
  data = netherlandsimmigrant, 
  model = ztpoisson, 
  method = "IRLS"
)
# Apply heteroscedasticity consistent covariance matrix estimation
require(sandwich)
cov <- vcovHC(Model, type = "HC3")
summary(Model, cov = cov,
popSizeEst = redoPopEstimation(Model, cov = cov))
# Compare to results with usual covariance matrix estimation
summary(Model)

## get confidence interval with larger significance level
redoPopEstimation(Model, control = controlPopVar(alpha = .000001))

[Package singleRcapture version 0.2.1.2 Index]