msvytotal: Robust M-estimation of the total for complex samples

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/msvytotal.R

Description

msvytotal computes robust Horvitz-Thompson estimates of the total or robust weighted total estimates for complex samples by means of M-estimation.

Usage

1
2
msvytotal(y, design, k, type = "rht", na.rm = FALSE, 
         control = rht.control(...), ...)

Arguments

y

a formula object (only one variable)

design

a survey.design object

k

robustness tuning constant

type

either "rht" for robust Horvitz-Thompson estimator (default), or "rwt" for robust weighted total estimator

na.rm

should cases with missing values be dropped? (default FALSE)

control

control object; see rht.control

...

(additional specifications which are delivered to rht.control)

Details

msvytotal performs (inverse probability-) weighted M-estimation (Huber psi-function or asymmetric Huber psi-function; asymmetric=TRUE). The msvytotal methods supports the following two methods (depending on the underlying survey design)

If y is positively correlated with the inclusion probabilities a "rht" type estimator should be used, and "rwm" otherwise. The initial value is a weighted median or a ratio of weighted medians. You may set steps equal to one in order to get a one-step estimation. Variance estimates are computed as first-order linearization using the design-based estimation facilities in the survey package.

msvytotal allows also the estimation for domains. Use the command subset and a design subset expression instead of the original survey.design object in msvytotal (see examples for more details).

Users may set exact=TRUE to compute an "exact" linearization-variance estimate, which takes into account that the MAD has been used as preliminary scale estimate. However, the estimates may become very unstable.

Value

Object of class "svystat.rob"

The following (S3) methods are defined for objects of the class "svystat.rob":

Author(s)

Beat Hulliger and Tobias Schoch

References

Hulliger, B. (1995): Outlier robust Horvitz-Thompson estimators, Survey Methodology 21 (1), pp. 79-87.

Hulliger, B. (1999): Simple and robust estimators for sampling, Proceedings of the Survey Research Methods Section, American Statistical Association, 1999, pp. 54-63.

Hulliger, B. and T. Schoch (2011): Elementary robust estimators. In: Robust methodology for Laeken indicators: AMELI Deliverable D4.2, ed. by B. Hulliger, A. Alfons, P. Filzmoser, A. Meraner, T. Schoch and M. Templ. AMELI Project.

See Also

svytotal

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## load "api" data set from "survey" package (a description of the data
## set can be found there)
data(api)
## define "survey.design" for stratified sampling
dstrat <- svydesign(id=~1,strata=~stype, weights=~pw, data=apistrat, 
fpc=~fpc)
## compute a robust Horvitz-Thompson estimate for the total of the 
## variable "api00" (Academic Performance Index in 2000)
rht1 <- msvytotal(~api00, dstrat, k=1.2)
# get a summary of the estimation
summary(rht1)
## robust Horvitz-Thompson estimates for a domain of the variable. Here
## we are interessted in the robust total for api00 for 
## (sch.wide == "Yes"). That is the average of the academic performance 
## in 2000 only for the schools that met the school-wide growth target.
msvytotal(~api00, subset(dstrat, sch.wide == "Yes"), k=1.2)
## to extract the estimate from the object 
coef(rht1) 
## to extract the variance from the object
vcov(rht1)

rhte documentation built on May 2, 2019, 6:24 p.m.