# approx_var_est: Approximated Variance Estimators In UPSvarApprox: Approximate the Variance of the Horvitz-Thompson Total Estimator

 approx_var_est R Documentation

## Approximated Variance Estimators

### Description

Approximated variance estimators which use only first-order inclusion probabilities

### Usage

approx_var_est(y, pik, method, sample = NULL, ...)


### Arguments

 y numeric vector of sample observations pik numeric vector of first-order inclusion probabilities of length N, the population size, or n, the sample size depending on the chosen method (see Details for more information) method string indicating the desired approximate variance estimator. One of "Deville1", "Deville2", "Deville3", "Hajek", "Rosen", "FixedPoint", "Brewer1", "HartleyRao", "Berger", "Tille", "MateiTille1", "MateiTille2", "MateiTille3", "MateiTille4", "MateiTille5", "Brewer2", "Brewer3", "Brewer4". sample Either a numeric vector of length equal to the sample size with the indices of sample units, or a boolean vector of the same length of pik, indicating which units belong to the sample (TRUE if the unit is in the sample, FALSE otherwise. Only used with estimators of the third class (see Details for more information). ... two optional parameters can be modified to control the iterative procedures in methods "MateiTille5", "Tille" and "FixedPoint": maxIter sets the maximum number of iterations to perform and eps controls the convergence error

### Details

The choice of the estimator to be used is made through the argument method, the list of methods and their respective equations is presented below.

Matei and Tillé (2005) divides the approximated variance estimators into three classes, depending on the quantities they require:

1. First and second-order inclusion probabilities: The first class is composed of the Horvitz-Thompson estimator (Horvitz and Thompson 1952) and the Sen-Yates-Grundy estimator (Yates and Grundy 1953; Sen 1953), which are available through function varHT in package sampling;

2. Only first-order inclusion probabilities and only for sample units;

3. Only first-order inclusion probabilities, for the entire population.

Haziza, Mecatti and Rao (2008) provide a common form to express most of the estimators in class 2 and 3:

var = ∑_s c*e^2

where e = y/π - B, with

∑ a*(y/π) / ∑ (a)

and a and c are parameters that define the different estimators:

• method="Hajek" [Class 2]

c = (n/(n-1)) (1-π); a = c

• method="Deville2" [Class 2]

c = (1-π) [1 - ∑ ( (1-pi)/∑ (1-pi))^2)]^(-1); a=c

• method="Deville3" [Class 2]

c = (1-π)[1 - ∑ ( (1-pi)/∑ (1-pi))^2)]^(-1); a=1

• method="Rosen" [Class 2]

c = (n/(n-1)) (1-π); a= (1-π)log(1-π) / π

• method="Brewer1" [Class 2]

c = (n/(n-1)) (1-π), a=1

• method="Brewer2" [Class 3]

c = (n/(n-1)) (1-π+π/n - ∑_U π/(n^2)); a=1

• method="Brewer3" [Class 3]

c = (n/(n-1)) (1-π - π/n - ∑_U π/(n^2)); a=1

• method="Brewer4" [Class 3]

c= (n/(n-1)) (1-π - π/(n-1) + ∑_U π^2 / (n*(n-1))); a=1

• method="Berger" [Class 3]

c = (n/(n-1)) (1-π) (∑_s (1-π) / ∑_U (1-pi)); a=c

• method="HartleyRao" [Class 3]

c= (n/(n-1)) (1-π - ∑_s π/n + ∑_U π^2 / n); a=1

Some additional estimators are defined in Matei and Tillé (2005):

• method="Deville1" [Class 2]

∑ (c/π^2) (y-y*)^2

where

y* = π (∑ c*y/π) / (∑ c)

and c = (n/(n-1)) (1-π)

• method="Tille" [Class 3]

var = ( ∑ ω ) ∑ ω( y* - γ )^2 - n∑ (y* - ∑(y/π)/n )^2

where y* = y/π, ω = π/β and γ = ∑(ω y*)/∑(ω)

The coefficients β are computed iteratively through the following procedure:

1. β(0) = π, i = 1, ..., N

2. β(2k-1) = ( (n-1)π )/(∑β(2k-2) - β(2k-2))

3. β(2k) = β(2k-1) ( n(n-1) / ( (∑β(2k-1))^2 - ∑( β(2k-1)^2 ) ) )^(1/2)

with β^{(k)} = ∑_{i\in U} β_i^{i}, \,\, k=1,2,3, …

• method="MateiTille1" [Class 3]

var = n(N-1)/(N(n-1)) ∑ (b/π^3) (y-y*)^2

where

y* = π (∑ b*y/(π^2)) / (∑ b/π )

and the coefficients b are computed iteratively by the algorithm:

1. b0 = π(1-π)(N/(N-1))

2. b(k) = [ b(i-1) ]^2 / [ ∑ b(i-1) ] + π(1-π)

a necessary condition for convergence is checked and, if not satisfied, the function returns an alternative solution that uses only one iteration:

b = π(1-π)( 1 + (Nπ(1-π)) / ( (N-1) ∑ π(1-π) ) )

• method="MateiTille2" [Class 3]

var = ( ∑ (1-π)( y/π - ∑(y/π)/n)^2 ) / (1-∑ (d^2/π))

where

d = (π(1-π)) / (∑ π(1-π))

• method="MateiTille3" [Class 3]

var = ( ∑ (1-π)( y/π - (∑(1-π)(y/π))/(∑(1-π)) )^2 ) / (1-∑ (d^2/π))

where d is defined as in method="MateiTille2".

• method="MateiTille4" [Class 3]

var = ∑ ( (b/(π^3)) (y-y*)^2 )

where

y* = π (∑ b*y/(π^2)) / (∑ b/π )

and

b = ( π(1-π)N ) / (N-1)

• method="MateiTille5" [Class 3] This estimator is defined as in method="MateiTille4", and the b values are defined as in method="MateiTille1"

### Value

a scalar, the estimated 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.

Haziza, D.; Mecatti, F.; Rao, J.N.K. 2008. Evaluation of some approximate variance estimators under the Rao-Sampford unequal probability sampling design. Metron LXVI (1), 91-108.

### Examples


### Generate population data ---
N <- 500; n <- 50

set.seed(0)
x <- rgamma(500, scale=10, shape=5)
y <- abs( 2*x + 3.7*sqrt(x) * rnorm(N) )

pik <- n * x/sum(x)
s   <- sample(N, n)

ys <- y[s]
piks <- pik[s]

### Estimators of class 2 ---
approx_var_est(ys, piks, method="Deville1")
approx_var_est(ys, piks, method="Deville2")
approx_var_est(ys, piks, method="Deville3")
approx_var_est(ys, piks, method="Hajek")
approx_var_est(ys, piks, method="Rosen")
approx_var_est(ys, piks, method="FixedPoint")
approx_var_est(ys, piks, method="Brewer1")

### Estimators of class 3 ---
approx_var_est(ys, pik, method="HartleyRao", sample=s)
approx_var_est(ys, pik, method="Berger", sample=s)
approx_var_est(ys, pik, method="Tille", sample=s)
approx_var_est(ys, pik, method="MateiTille1", sample=s)
approx_var_est(ys, pik, method="MateiTille2", sample=s)
approx_var_est(ys, pik, method="MateiTille3", sample=s)
approx_var_est(ys, pik, method="MateiTille4", sample=s)
approx_var_est(ys, pik, method="MateiTille5", sample=s)
approx_var_est(ys, pik, method="Brewer2", sample=s)
approx_var_est(ys, pik, method="Brewer3", sample=s)
approx_var_est(ys, pik, method="Brewer4", sample=s)



UPSvarApprox documentation built on June 12, 2022, 9:05 a.m.