fast_jackknife_variance: Calculates Jackknife variance without reweighting

Description Usage Arguments Details Value References Examples

View source: R/NonProbEst.R

Description

Calculates the variance of a given estimator by Leave-One-Out Jackknife (Quenouille, 1956) with the original adjusted weights.

Usage

1
fast_jackknife_variance(sample, weights, estimated_vars, N = NULL)

Arguments

sample

A data frame containing the sample.

weights

A vector containing the pre-calculated weights.

estimated_vars

A string vector specifying the variables for which the estimators' variance are to be estimated.

N

Integer indicating the population size. Optional.

Details

The variance estimation is performed by eliminating an individual at each iteration with its corresponding weight and estimating the mean of the corresponding subsample, which is further used in the Jackknife formula as the usual procedure. The calculation of variance estimates through this procedure might take less computation time but also might not take into account the variance of the weighting method.

Value

A vector containing the resulting variance for each variable.

References

Quenouille, M. H. (1956). Notes on bias in estimation. Biometrika, 43(3/4), 353-360.

Examples

1
2
3
4
covariates = c("education_primaria", "education_secundaria")
data_propensities = propensities(sampleNP, sampleP, covariates)
psa_weights = sc_weights(data_propensities$convenience)
fast_jackknife_variance(sampleNP, psa_weights, c("vote_pens"), 50000)

NonProbEst documentation built on July 1, 2020, 6:08 p.m.