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 |
... |
additional optional arguments, currently not used in |
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 |
control |
similar to |
popVar |
similar to |
offset |
offset argument for new data |
weightsAsCounts |
for |
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))