View source: R/svymean_tukey.R
svymean_tukey | R Documentation |
Weighted Tukey biweight (or bisquare) M-estimator of the population mean and total (robust Horvitz-Thompson estimator)
svymean_tukey(x, design, k, type = "rwm", na.rm = FALSE, verbose = TRUE, ...) svytotal_tukey(x, design, k, type = "rwm", na.rm = FALSE, verbose = TRUE, ...)
x |
a one-sided |
design |
an object of class |
k |
|
type |
|
na.rm |
|
verbose |
|
... |
additional arguments passed to the method (e.g.,
|
Package survey must be loaded in order to use the functions.
type = "rht"
or type = "rwm"
; see
weighted_mean_tukey
for more details.
Taylor linearization (residual variance estimator).
summary
,
coef
, SE
,
vcov
,
residuals
,
fitted
,
robweights
.
See weighted_mean_tukey
and
weighted_total_tukey
.
Object of class svystat_rob
By default, the method assumes a maximum number of maxit = 100
iterations and a numerical tolerance criterion to stop the iterations of
tol = 1e-05
. If the algorithm fails to converge, you may
consider changing the default values; see svyreg_control
.
Hulliger, B. (1995). Outlier Robust Horvitz-Thompson Estimators. Survey Methodology 21, 79–87.
Overview (of all implemented functions)
svymean_huber
and svytotal_huber
data(workplace) library(survey) # Survey design for simple random sampling without replacement dn <- svydesign(ids = ~ID, strata = ~strat, fpc = ~fpc, weights = ~weight, data = workplace) # Robust Horvitz-Thompson M-estimator of the population total svytotal_tukey(~employment, dn, k = 9, type = "rht") # Robust weighted M-estimator of the population mean m <- svymean_tukey(~employment, dn, k = 12, type = "rwm") # Summarize summary(m) # Extract estimate coef(m) # Extract estimate of scale scale(m) # Extract estimated standard error SE(m)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.