
The update method for the nonprob object with changed arguments or parameters
Source:R/methods.R
update.nonprob.Rd
The update
method for the nonprob
class object that allows to re-estimate
a given model with changed parameter. This is in particular useful if a user
would like to change method or estimate standard errors if they were not
estimated in the first place.
Usage
# S3 method for class 'nonprob'
update(object, ..., evaluate = TRUE)
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", se = FALSE
)
ipw_est1
#> A nonprob object
#> - estimator type: inverse probability weighting
#> - method: logit (mle)
#> - auxiliary variables source: survey
#> - vars selection: false
#> - variance estimator: analytic
#> - population size fixed: false
#> - naive (uncorrected) estimator: 0.6605
#> - selected estimator: 0.7224 (se=NA, ci=(NA, NA))
update(ipw_est1, se = TRUE)
#> A nonprob object
#> - estimator type: inverse probability weighting
#> - method: logit (mle)
#> - auxiliary variables source: survey
#> - vars selection: false
#> - variance estimator: analytic
#> - population size fixed: false
#> - naive (uncorrected) estimator: 0.6605
#> - selected estimator: 0.7224 (se=0.0421, ci=(0.6399, 0.8048))