Description Usage Arguments Details Value Author(s) References See Also Examples
msvyratio
computes a robust ratio estimate for complex samples by means of M-estimation ("rht" type).
1 2 | msvyratio(numerator, denominator, design, k, na.rm = FALSE,
control = rht.control(...), ...)
|
numerator |
a formula object (only one variable) |
denominator |
a formula object (only one variable) |
design |
a |
k |
robustness tuning constant |
na.rm |
should cases with missing values be dropped? (default |
control |
control object; see |
... |
(additional specifications which are delivered to |
msvyratio
computes a robust ratio estimate for complex samples by means of M-estimation (type "rht"; see msvymean
for more details). Variance estimates are computed as first-order linearization using the design-based estimation facilities in the survey package.
The initial value is a weighted median or a ratio of weighted medians. You may set steps
equal to one in order to obtain an one-step estimator.
msvyratio
allows also the estimation for domains. Use the command subset
and a design subset expression instead of the original survey.design
object in msvyratio
(see examples for more details).
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 | ## 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)
ratio1 <- msvyratio(~api00, ~api99, dstrat, k=1.2, na.rm=TRUE)
## get a summary of the estimation
summary(ratio1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.