Learn R Programming

nonprobsvy (version 0.2.1)

confint.nonprob: Returns confidence intervals for estimated mean

Description

A generic function that returns the confidence interval for the estimated mean. If standard errors have not been estimated, the function updates the nonprob object to obtain standard errors.

Usage

# S3 method for nonprob
confint(object, parm, level = 0.95, ...)

Value

returns a data.frame with confidence intervals for the target variables

Arguments

object

object of nonprob class.

parm

names of parameters for which confidence intervals are to be computed, if missing all parameters will be considered.

level

confidence level for intervals.

...

additional arguments

Examples

Run this code
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
)

confint(ipw_est1)

Run the code above in your browser using DataLab