pop_size {nonprobsvy} | R Documentation |
Returns population size (estimated or fixed)
Description
Returns population size that is assumed to be
fixed
– if it is based on thepop_size
argument,estimated
– if it is based on the probability survey specified in thesvydesign
or based on the estimated propensity scores for the non-probability sample.
Usage
pop_size(object)
Arguments
object |
object returned by the |
Value
a scalar returning the value of the population size.
Examples
data(admin)
data(jvs)
jvs_svy <- svydesign(ids = ~ 1, weights = ~ weight,
strata = ~ size + nace + region, data = jvs)
ipw_est1 <- nonprob(selection = ~ region + private + nace + size,
target = ~ single_shift,
svydesign = jvs_svy,
data = admin, method_selection = "logit"
)
ipw_est2 <- nonprob(
selection = ~ region + private + nace + size,
target = ~ single_shift,
svydesign = jvs_svy,
data = admin, method_selection = "logit",
control_selection = control_sel(est_method = "gee", gee_h_fun = 1))
## estimated population size based on the non-calibrated IPW (MLE)
pop_size(ipw_est1)
## estimated population size based on the calibrated IPW (GEE)
pop_size(ipw_est2)
[Package nonprobsvy version 0.2.2 Index]