vartaylor_ratio: Taylor-series linearization variance estimation of a ratio

View source: R/vartaylor_ratio.r

vartaylor_ratioR Documentation

Taylor-series linearization variance estimation of a ratio

Description

Computes the Taylor-series linearization variance estimation of the ratio

\frac{\widehat{Y}_s}{\widehat{X}_s}.

The estimators in the ratio are Horvitz-Thompson type estimators.

Usage

vartaylor_ratio(Ys,Xs,pikls)

Arguments

Ys

vector of the first observed variable; its length is equal to n, the sample size.

Xs

vector of the second observed variable; its length is equal to n, the sample size.

pikls

matrix of joint inclusion probabilities of the sample units; its dimension is nxn.

Details

The function implements the following estimator:

\widehat{Var}(\frac{\widehat{Ys}}{\widehat{Xs}})=\sum_{i\in s}\sum_{j\in s}\frac{\pi_{ij}-\pi_i\pi_j}{\pi_{ij}}\frac{\widehat{z_i}\widehat{z_j}}{\pi_i\pi_j}

where \widehat{z_i}=(Ys_i-\widehat{r}Xs_i)/\widehat{X}_s, \widehat{r}=\widehat{Y}_s/\widehat{X}_s, \widehat{Y}_s=\sum_{i\in s}{Ys_i/\pi_i}, \widehat{X}_s=\sum_{i\in s}{Xs_i/\pi_i}.

References

Woodruff, R. (1971). A Simple Method for Approximating the Variance of a Complicated Estimate, Journal of the American Statistical Association, Vol. 66, No. 334 , pp. 411–414.

Examples

data(belgianmunicipalities)
attach(belgianmunicipalities)
# inclusion probabilities, sample size 200
pik=inclusionprobabilities(Tot04,200)
# the first variable (population level)
Y=Men04
# the second variable (population level)
X=Women04
# population size
N=length(pik)             
# joint inclusion probabilities for Poisson sampling
pikl=outer(pik,pik,"*")
diag(pikl)=pik
# draw a sample using Poisson sampling 
s=UPpoisson(pik)           
# sample inclusion probabilities
piks=pik[s==1]            
# the first observed variable (sample level)  
Ys=Y[s==1]
# the second observed variable (sample level)  
Xs=X[s==1]              
# matrix of joint inclusion prob. (sample level)          
pikls=pikl[s==1,s==1] 
# ratio estimator and its estimated variance
vartaylor_ratio(Ys,Xs,pikls)

sampling documentation built on Nov. 2, 2023, 6:26 p.m.