weighted_mean_dalen function

Dalen Estimators of the Mean and Total

Dalen Estimators of the Mean and Total

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)

Arguments

  • x: [numeric vector] data.
  • w: [numeric vector] weights (same length as x).
  • censoring: [double] cutoff threshold above which the observations are censored.
  • type: [character] type of estimator; either "Z2" or "Z3" (default: "Z2").
  • info: [logical] indicating whether additional information should be returned (default: FALSE).
  • na.rm: [logical] indicating whether NA values should be removed before the computation proceeds (default: FALSE).
  • verbose: [logical] indicating whether additional information should be printed to the console (default: FALSE).

Details

Let sum(w[i]x[i])sum(w[i]x[i]) denote the expansion estimator of the xx-total (summation is over all elements ii

in sample ss). The estimators Z2 and Z3 of Dalén (1987) are defined as follows.

  • Estimator Z2: The estimator Z2 of the population total sums over min(c,w[i]x[i]min(c, w[i]x[i]; hence, it censors the products w[i]x[i]w[i]x[i] to the censoring constant cc (censoring). The estimator of the population xx-mean is is defined as the total divided by the population size.

  • Estimator Z3: The estimator Z3 of the population total is defined as the sum over the elements z[i]z[i], which is equal to z[i]=w[i]x[i]z[i] = w[i]x[i]

     if $w[i]x[i] <= c$ and $z[i] = c + (y[i] - c/w[i])$
     
     otherwise.
    

Returns

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]`
    

References

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.

See Also

Overview (of all implemented functions)

Examples

head(workplace) # Dalen's estimator of the total (with censoring threshold: 100000) weighted_total_dalen(workplace$employment, workplace$weight, 100000)
  • Maintainer: Tobias Schoch
  • License: GPL (>= 2)
  • Last published: 2024-08-22