Description Usage Arguments Details Value Author(s) References See Also Examples
msvymean
computes robust Horvitz-Thompson estimates of the mean or robust weighted mean estimates for complex samples based on using M-estimation.
1 2 |
y |
a formula object (only one variable) |
design |
a |
k |
robustness tuning constant |
type |
either |
na.rm |
should cases with missing values be dropped? (default |
control |
control object; see |
... |
(additional specifications which are delivered to |
msvymean
performs (inverse probability-) weighted M-estimation (Huber psi-function or asymmetric Huber psi-function; asymmetric=TRUE
). The msvymean
methods supports the following two methods (depending on the underlying sampling design)
robust Horvitz-Thompson estimator (type="rht"
),
robust weighted mean estimator (type="rwm"
).
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 estimator. Variance estimates are computed as first-order linearization using the design-based-estimation facilities in the survey package.
msvymean
allows also the estimation for domains. Use the command subset
and a design subset expression instead of the original survey.design
object in msvymean
(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.
Object of class "svystat.rob"
.
The following (S3) methods are defined for objects of the class "svystat.rob"
:
print
method,
summary
method,
coef
method,
vcov
method,
residuals
method,
robweights
method.
Beat Hulliger and Tobias Schoch
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.
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 mean of the
## variable "api00" (Academic Performance Index in 2000)
rht1 <- msvymean(~api00, dstrat, type="rht", 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 mean 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.
msvymean(~api00, subset(dstrat, sch.wide == "Yes"), type="rht", k=1.2)
## to extract the estimate from the object
coef(rht1)
## to extract the variance from the object
vcov(rht1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.