optimStrat (version 2.1)

varstsi: Variance of STSI Sampling with the HT Estimator

Description

Compute the design variance of the Horvitz-Thompson estimator of the total of y under Stratified Simple Random Sampling, where strata are indicated by stratum and the sample sizes by stratum are given by nh.

Usage

varstsi(y,stratum,nh)

Arguments

y

a numeric vector giving the values of the study variable.

stratum

a vector indicating the stratum to which each element belongs.

nh

a vector indicating the sample size of the stratum to which each element belongs.

Value

A numeric value giving the variance of the Horvitz-Thompson estimator under Stratified Simple Random Sampling.

Details

The variance of the Horvitz-Thompson estimator under Stratified Simple Random Sampling is computed as: \(V_{STSI}\left[\hat{t}_{HT}\right] = \sum_{h} V_{h}\) with $$V_{h} = \frac{N_{h}^{2}}{n_{h}}\left(1-\frac{n_{h}}{N_{h}}\right)S_{y,U_{h}}^{2}$$ where \(S_{y,U_{h}}^{2}\) is the variance of y in the \(h\)th stratum.

The variance of Simple Random Sampling is computed if stratum is a constant.

References

Sarndal, C.E., Swensson, B. and Wretman, J. (1992). Model Assisted Survey Sampling. Springer.

See Also

stratify for a method to define the strata; optiallo for Neyman optimal allocation of the sample; varpips for the variance of the Horvitz-Thompson estimator under probability proportional-to-size sampling; varpipspos for the variance of the poststratified estimator under probability proportional-to-size sampling; varstsipos for the variance of the poststratified estimator under stratified simple random sampling; varpipsreg for the variance of the regression estimator under probability proportional-to-size sampling; varstsireg for the variance of the regression estimator under stratified simple random sampling.

Examples

Run this code
# NOT RUN {
x<- 1 + sort( rgamma(5000, shape=4/9, scale=108) ) #simulating the auxiliary variable
st1<- optiallo(n=100,x=x^0.75,H=6)
y<- simulatey(x,b0=10,b1=1,b2=1.25,b4=0.75,rho=0.95)
varstsi(y,stratum=st1$stratum,nh=st1$nh)
# }

Run the code above in your browser using DataLab