View source: R/weighted_mean_tukey.R
weighted_mean_tukey | R Documentation |
Weighted Tukey biweight M-estimator of the mean and total (bare-bone
function with limited functionality; see svymean_tukey
and
svytotal_tukey
for more capable methods)
weighted_mean_tukey(x, w, k, type = "rwm", info = FALSE, na.rm = FALSE, verbose = TRUE, ...) weighted_total_tukey(x, w, k, type = "rwm", info = FALSE, na.rm = FALSE, verbose = TRUE, ...)
x |
|
w |
|
k |
|
type |
|
info |
|
na.rm |
|
verbose |
|
... |
additional arguments passed to the method (e.g., |
Population mean or total. Let μ denote the estimated population mean; then, the estimated total is given by Nhat μ with Nhat = sum(w[i]), where summation is over all observations in the sample.
Two methods/types are available for estimating the location:
type = "rwm" (default)
:robust weighted
M-estimator of the population mean and total,
respectively. This estimator is recommended for sampling
designs whose inclusion probabilities are not
proportional to some measure of size. [Legacy note: In an
earlier version, the method type = "rwm"
was called
"rhj"
; the type "rhj"
is now silently
converted to "rwm"
]
type = "rht"
:robust Horvitz-Thompson M-estimator of the population mean and total, respectively. This estimator is recommended for proportional-to-size sampling designs.
See survey methods:
svymean_tukey
,
svytotal_tukey
.
Tukey biweight (or bisquare) psi-function with
tuning parameter k
The return value depends on info
:
info = FALSE
:estimate of mean or total [double]
info = TRUE
:a [list]
with items:
characteristic
[character]
,
estimator
[character]
,
estimate
[double]
,
variance
(default: NA
),
robust
[list]
,
residuals
[numeric vector]
,
model
[list]
,
design
(default: NA
),
[call]
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)
weighted_mean_huber
and weighted_total_huber
data(workplace) # Robust Horvitz-Thompson M-estimator of the population total weighted_total_tukey(workplace$employment, workplace$weight, k = 9, type = "rht") # Robust weighted M-estimator of the population mean weighted_mean_tukey(workplace$employment, workplace$weight, k = 12, type = "rwm")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.