Description Usage Arguments Details Value References Examples
Calculates the variance of a given estimator by Leave-One-Out Jackknife (Quenouille, 1956) with reweighting in each iteration.
1 | generic_jackknife_variance(sample, estimator, N = NULL)
|
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. |
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.
The resulting variance.
Quenouille, M. H. (1956). Notes on bias in estimation. Biometrika, 43(3/4), 353-360.
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.