svymean_ratio: Robust Ratio Predictor of the Mean and Total

View source: R/svymean_ratio.R

svymean_ratioR Documentation

Robust Ratio Predictor of the Mean and Total

Description

Robust ratio predictor (M-estimator) of the population mean and total with Huber and Tukey biweight (bisquare) psi-function.

Usage

svytotal_ratio(object, total, variance = "wu", keep_object = TRUE)
svymean_ratio(object, total, N = NULL, variance = "wu",
    keep_object = TRUE, N_unknown = FALSE)

Arguments

object

an object of class [ratio], e.g., result of the Huber ratio M-estimator svyratio_huber.

total

[numeric] vector of population totals of the auxiliary variables.

N

[numeric] population size (see also N_unknown.

variance

[character] type of variance estimator (default: "wu"); see Details Section.

keep_object

[logical] if TRUE, object is returned as an additional slot of the return value (default: TRUE).

N_unknown

[logical] if TRUE, it is assumed that the population size is unknown; thus, it is estimated (default: FALSE).

Details

Package survey must be loaded in order to use the functions.

The (robust) ratio predictor of the population total or mean is computed in two steps.

  • Step 1: Fit the ratio model associated with the predictor by one of the functions svyratio_huber or svyratio_tukey. The fitted model is called object.

  • Step 2: Based on the fitted model obtained in the first step, we predict the population total and mean, respectively, by the predictors svytotal_ratio and svymean_ratio, where object is the fitted ratio model.

Auxiliary data

Two types of auxiliary variables are distinguished: (1) population size N and (2) the population total of the auxiliary variable (denominator) used in the ratio model.

The option N_unknown = TRUE can be used in the predictor of the population mean if N is unknown.

Variance estimation

Three variance estimators are implemented (argument variance): "base", "wu", and "hajek". These estimators correspond to the estimators v0, v1, and v2 in Wu (1982).

Utility functions

The return value is an object of class svystat_rob. Thus, the utility functions summary, coef, SE, vcov, residuals, fitted, and robweights are available.

Value

Object of class svystat_rob

References

Wu, C.-F. (1982). Estimation of Variance of the Ratio Estimator. Biometrika 69, 183–189.

See Also

Overview (of all implemented functions)

svymean_reg and svytotal_reg for (robust) GREG regression predictors

svyreg_huberM, svyreg_huberGM, svyreg_tukeyM and svyreg_tukeyGM for robust regression M- and GM-estimators

svymean_huber, svytotal_huber, svymean_tukey and svytotal_tukey for M-estimators

Examples

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 ratio M-estimator with Huber psi-function
rat <- svyratio_huber(~payroll, ~ employment, dn, k = 5)

# Robust ratio predictor
m <- svymean_ratio(rat, total = 1001233, N = 90840)
m

# Summarize
summary(m)

# Extract estimate
coef(m)

# Extract estimate of scale
scale(m)

# Extract estimated standard error
SE(m)

robsurvey documentation built on Jan. 6, 2023, 5:09 p.m.