Model-Assisted Survey Estimators

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) , and the regression tree estimator described in McConville and Toth (2017) . The variance estimators which approximate the joint inclusion probabilities can be found in Berger and Tille (2009) and the bootstrap variance estimator is presented in Mashreghi et al. (2016) .


mase is still under development. Please use at your own risk!

mase

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.

Installation

You can install mase from github with:

devtools::install_github("Swarthmore-Statistics/mase")

Example

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 package
library(survey)
#> Loading required package: grid
#> Loading required package: Matrix
#> Loading required package: survival
#> 
#> Attaching package: 'survey'
#> The following object is masked from 'package:graphics':
#> 
#>     dotchart
data(api)
horvitzThompson(y = apisrs$api00, pi = apisrs$pw^(-1), var_est = TRUE, var_method = "lin_HTSRS")
#> $pop_total
#> [1] 4066887
#> 
#> $pop_mean
#> [1] 656.585
#> 
#> $pop_total_var
#> [1] 3282462447
#> 
#> $pop_mean_var
#> [1] 85.55736

News

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("mase")

0.1.2 by Kelly McConville, 3 months ago


Browse source code at https://github.com/cran/mase


Authors: Kelly McConville [aut, cre, cph] , Becky Tang [aut] , George Zhu [aut] , Sida Li [ctb] , Shirley Chueng [ctb] , Daniell Toth [ctb, cph] (Author and copyright holder of treeDesignMatrix helper function)


Documentation:   PDF Manual  


GPL-2 license


Imports glmnet, Matrix, foreach, survey, dplyr, magrittr, rpms, boot, stats, Rdpack

Suggests roxygen2, testthat


See at CRAN