redoPopEstimation function

Updating population size estimation results

Updating population size estimation results

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.

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

Returns

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

Details

\loadmathjax

Any non specified arguments will be inferred from the object

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))
  • Maintainer: Maciej Beręsewicz
  • License: MIT + file LICENSE
  • Last published: 2025-02-13