Dalén's estimators of the population mean and the population total (bare-bone functions with limited functionality).
weighted_mean_dalen(x, w, censoring, type = "Z2", info = FALSE,
na.rm = FALSE, verbose = TRUE)
weighted_total_dalen(x, w, censoring, type = "Z2", info = FALSE,
na.rm = FALSE, verbose = TRUE)
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]
[numeric vector]
data.
[numeric vector]
weights (same length as x
).
[double]
cutoff threshold above which the
observations are censored.
[character]
type of estimator; either "Z2"
or
"Z3"
(default: "Z2"
).
[logical]
indicating whether additional information
should be returned (default: FALSE
).
[logical]
indicating whether NA
values should be
removed before the computation proceeds (default: FALSE
).
[logical]
indicating whether additional information
should be printed to the console (default: FALSE
).
Let \(\sum_{i \in s} w_ix_i\) denote the expansion estimator of the \(x\)-total (summation is over all elements \(i\) in sample \(s\)). The estimators Z2 and Z3 of Dalén (1987) are defined as follows.
The estimator Z2 of the population total sums over
\(\min(c, w_ix_i)\); hence, it
censors the products \(w_ix_i\) to the
censoring constant \(c\) (censoring
). The estimator of
the population \(x\)-mean is is defined as the total divided
by the population size.
The estimator Z3 of the population total is defined as the sum over the elements \(z_i\), which is equal to \(z_i = w_ix_i\) if \(w_iy_i \leq c\) and \(z_i = c + (y_i - c/w_i)\) otherwise.
Dalén, J. (1987). Practical Estimators of a Population Total Which Reduce the Impact of Large Observations. R & D Report U/STM 1987:32, Statistics Sweden, Stockholm.
Overview (of all implemented functions)
head(workplace)
# Dalen's estimator of the total (with censoring threshold: 100000)
weighted_total_dalen(workplace$employment, workplace$weight, 100000)
Run the code above in your browser using DataLab