generic_jackknife_variance: Calculates Jackknife variance with reweighting for an...

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 reweighting in each iteration.

Usage

1

Arguments

sample

Data frame containing the non-probabilistic sample.

estimator

Function that, given a sample as a parameter, returns an estimation.

N

Integer indicating the population size. Optional.

Details

The estimation of the variance requires a recalculation of the estimates in each iteration which might involve weighting adjustments, leading to an increase in computation time. It is expected that the estimated variance captures the weighting adjustments' variability and the estimator's variability.

Value

The resulting variance.

References

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

Examples

1
2
3
4
5
6
7
8
9
covariates = c("education_primaria", "education_secundaria",
   "age", "sex", "language")
if (is.numeric(sampleNP$vote_gen))
   sampleNP$vote_gen = factor(sampleNP$vote_gen, c(0, 1), c('F', 'T'))
vote_gen_estimator = function(sample) {
   model_based(sample, population, covariates,
      "vote_gen", positive_label = 'T', algorithm = 'glmnet')
}
generic_jackknife_variance(sampleNP, vote_gen_estimator)

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