Learn R Programming

autoMrP

autoMrP improves the prediction performance of multilevel regression with post-stratification (MrP) by combining a number of machine learning methods through ensemble Bayesian model averaging (EBMA). The full discussion can be found here: Broniecki, Leemann, and Wüest. 2020. "Improving Multilevel Regression with Post-Stratification Through Machine Learning (autoMrP)," forthcoming in the Journal of Politics.

Installation

To install autoMrP from GitHub run:

devtools::install_github("retowuest/autoMrP", build_vignettes = TRUE)

Please refer to the vignette for a detailed introduction to autoMrP. Access the vignette via:

utils::browseVignettes("autoMrP")

Copy Link

Version

Install

install.packages('autoMrP')

Monthly Downloads

336

Version

1.0.6

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Philipp Broniecki

Last Published

January 30th, 2024

Functions in autoMrP (1.0.6)

log_spaced

Sequence that is equally spaced on the log scale
ebma_mc_tol

EBMA multicore tuning - parallelises over tolerance values.
gb_classifier

GB classifier
loss_function

Estimates loss value.
ebma_mc_draws

EBMA multicore tuning - parallelises over draws.
gb_classifier_update

GB classifier update
ebma_folding

Generates data fold to be used for EBMA tuning
lasso_classifier

Lasso classifier
f1_score

Estimates the inverse f1 score, i.e. 0 is the best score and 1 the worst.
error_checks

Catches user input errors
mean_squared_error

Estimates the mean squared prediction error.
multicore

Register cores for multicore computing
plot.autoMrP

A plot method for autoMrP objects. Plots unit-level preference estiamtes.
mean_squared_false_error

Estimates the mean squared false error.
model_list

A list of models for the best subset selection.
post_stratification

Apply post-stratification to classifiers.
model_list_pca

A list of models for the best subset selection with PCA.
output_table

A table for the summary function
loss_score_ranking

Ranks tuning parameters according to loss functions
mean_absolute_error

Estimates the mean absolute prediction error.
run_gb_mc

GB multicore tuning.
quiet

Suppress cat in external package
run_best_subset

Apply best subset classifier to MrP.
predict_glmmLasso

Predicts on newdata from glmmLasso objects
run_lasso_mc_lambda

Lasso multicore tuning.
run_classifiers

Optimal individual classifiers
run_lasso

Apply lasso classifier to MrP.
run_gb

Apply gradient boosting classifier to MrP.
run_best_subset_mc

Best subset multicore tuning.
run_pca

Apply PCA classifier to MrP.
svm_classifier

SVM classifier
run_svm_mc

SVM multicore tuning.
run_svm

Apply support vector machine classifier to MrP.
summary.autoMrP

A summary method for autoMrP objects.
taxes_census

Quasi census data.
taxes_survey

Sample on raising taxes from the 2008 National Annenberg Election Studies.
survey_item

A sample of a survey item from the CCES 2008
deep_mrp_classifier

Deep MrP classifier
cv_folding

Generates folds for cross-validation
binary_cross_entropy

Estimates the inverse binary cross-entropy, i.e. 0 is the best score and 1 the worst.
census

Quasi census data.
ebma

Bayesian Ensemble Model Averaging EBMA
best_subset_classifier

Best subset classifier
boot_auto_mrp

Bootstrappinng wrapper for auto_mrp
absentee_census

Quasi census data.
absentee_voting

A sample of the absentee voting item from the CCES 2008
auto_MrP

Improve MrP through ensemble learning.