optimStrat (version 2.1)

varstsipos: Design variance of a STSI--pos sampling strategy.

Description

Compute the design variance of the poststratified estimator of the total of y under Stratified Simple Random Sampling, where strata are indicated by stratum and the sample of size n is allocated using Neyman allocation with respect to x.

Usage

varstsipos(y, stratum, nh, poststratum)

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.

poststratum

a vector indicating the poststratum to which each element belongs.

Value

A numeric value giving the variance of the poststratified estimator under Stratified Simple Random Sampling.

Details

A sample of size \(n\) is allocated into the strata using \(x\)-optimal allocation, i.e. $$n_{h} \propto N_{h}S_{x,U_{h}}$$ where \(N_h\) is the size of the \(h\)th stratum, \(S_{x,U_{h}}\) is the standard deviation of x in the \(h\)th stratum and \(propto\) stands for ‘proportional to’.

If \(n_{h}>N_{h}\) for at least one stratum, \(n_h\) is set equal to \(N_h\) in those strata and optimal allocation is used again for the remaining strata with the remaining sample size.

Once the \(n_h\) are obtained, the variance of the poststratified 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_{E,U_{h}}^{2}$$ where \(S_{E,U_{h}}^{2}\) is the variance of E in the \(h\)th stratum with \(E_{k}=y_{k}-B_{g}\) and \(B_{g}=\bar{y}_{g}\).

See Also

varpips for the variance of the Horvitz-Thompson estimator under probability proportional-to-size sampling; varstsi for the variance of the Horvitz-Thompson estimator under stratified simple random sampling; varpipspos for the variance of the poststratified estimator under probability proportional-to-size 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
strat1<- optiallo(n=150,x^0.75,H=6)
post1<- stratify(x^1.25,H=6)
y<- simulatey(x,b0=10,b1=1,b2=1.25,b4=0.75,rho=0.95)
varstsipos(y, stratum=strat1$stratum,nh=strat1$nh,poststratum=post1)
# }

Run the code above in your browser using DataCamp Workspace