optimStrat (version 2.1)

varstsireg: Design variance of a STSI--reg 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

varstsireg(y, stratum, nh, x)

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.

x

a positive numeric vector giving the values of the auxiliary variable that is used at the estimation stage.

Value

A numeric value giving the variance of the regression 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}-\hat{y}_{k}\).

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; 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.

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)
y<- simulatey(x,b0=10,b1=1,b2=1.25,b4=0.75,rho=0.95)
varstsireg(y, stratum=strat1$stratum,nh=strat1$nh,x=x^1.25)
# }

Run the code above in your browser using DataLab