# NOT RUN {
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)
# }
Run the code above in your browser using DataLab