Var_approx {UPSvarApprox} | R Documentation |
Approximate the Variance of the Horvitz-Thompson estimator
Description
Approximations of the Horvitz-Thompson variance for High-Entropy sampling designs. Such methods use only first-order inclusion probabilities.
Usage
Var_approx(y, pik, n, method, ...)
Arguments
y |
numeric vector containing the values of the variable of interest for all population units |
pik |
numeric vector of first-order inclusion probabilities, of length equal to population size |
n |
a scalar indicating the sample size |
method |
string indicating the approximation that should be used. One of "Hajek1", "Hajek2", "HartleyRao1", "HartleyRao2", "FixedPoint". |
... |
two optional parameters can be modified to control the iterative
procedure in |
Details
The variance approximations available in this function are described below, the notation used is that of Matei and Tillé (2005).
Hájek variance approximation (
method="Hajek1"
):where
and
Starting from Hajék (1964), Brewer (2002) defined the following estimator (
method="Hajek2"
):where
and
Hartley and Rao (1962) variance approximation (
method="HartleyRao1"
):Hartley and Rao (1962) provide a simplified version of the variance above (
method="HartleyRao2"
):-
method="FixedPoint"
computes the Fixed-Point variance approximation proposed by Deville and Tillé (2005). The variance can be expressed in the same form as inmethod="Hajek1"
, and the coefficientsare computed iteratively by the algorithm:
a necessary condition for convergence is checked and, if not satisfied, the function returns an alternative solution that uses only one iteration:
-
Value
a scalar, the approximated variance.
References
Matei, A.; Tillé, Y., 2005. Evaluation of variance approximations and estimators in maximum entropy sampling with unequal probability and fixed sample size. Journal of Official Statistics 21 (4), 543-570.
Examples
N <- 500; n <- 50
set.seed(0)
x <- rgamma(n=N, scale=10, shape=5)
y <- abs( 2*x + 3.7*sqrt(x) * rnorm(N) )
pik <- n * x/sum(x)
pikl <- outer(pik, pik, '*'); diag(pikl) <- pik
### Variance approximations ---
Var_approx(y, pik, n, method = "Hajek1")
Var_approx(y, pik, n, method = "Hajek2")
Var_approx(y, pik, n, method = "HartleyRao1")
Var_approx(y, pik, n, method = "HartleyRao2")
Var_approx(y, pik, n, method = "FixedPoint")