A set of model-assisted survey estimators and corresponding
variance estimators for single stage, unequal probability, without replacement
sampling designs. All of the estimators can be written as a generalized
regression estimator with the Horvitz-Thompson, ratio, post-stratified, and
regression estimators summarized by Sarndal et al. (1992, ISBN:978-0-387-40620-6).
Two of the estimators employ a statistical learning model as the assisting model:
the elastic net regression estimator, which is an extension of the lasso regression
estimator given by McConville et al. (2017)
mase is still under development. Please use at your own risk!
mase contains a collection of model-assisted generalized regression estimators (the post-stratification estimator, the ratio estimator, the linear and logistic regression estimator, the elastic net regression estimator, and the regression tree estimator) for finite population estimation of a total or mean from a single stage, unequal probability without replacement design. It also contains the Horvitz-Thompson estimator and several variance estimators.
You can install mase from github with:
Here's an example of fitting the Horvitz-Thompson estimator:
library(mase)## Estimates the mean and total of the api00 variable using the apisrs dataset in the survey packagelibrary(survey)#> Loading required package: grid#> Loading required package: Matrix#> Loading required package: survival#>#> Attaching package: 'survey'#> The following object is masked from 'package:graphics':#>#> dotchartdata(api)horvitzThompson(y = apisrs$api00, pi = apisrs$pw^(-1), var_est = TRUE, var_method = "lin_HTSRS")#> $pop_total#>  4066887#>#> $pop_mean#>  656.585#>#> $pop_total_var#>  3282462447#>#> $pop_mean_var#>  85.55736