VE.HT.Mean.NHT | R Documentation |
Computes the Horvitz-Thompson (1952) variance estimator for the Narain (1951); Horvitz-Thompson (1952) point estimator for a population mean.
VE.HT.Mean.NHT(VecY.s, VecPk.s, MatPkl.s, N)
VecY.s |
vector of the variable of interest; its length is equal to n, the sample size. Its length has to be the same as that of |
VecPk.s |
vector of the first-order inclusion probabilities; its length is equal to n, the sample size. Values in |
MatPkl.s |
matrix of the second-order inclusion probabilities; its number of rows and columns equals n, the sample size. Values in |
N |
the population size. It must be an integer or a double-precision scalar with zero-valued fractional part. |
For the population mean of the variable y:
\bar{y} = \frac{1}{N}∑_{k\in U} y_k
the unbiased Narain (1951); Horvitz-Thompson (1952) estimator of \bar{y} is given by:
\hat{\bar{y}}_{NHT} = \frac{1}{N}∑_{k\in s} \frac{y_k}{π_k}
where π_k denotes the inclusion probability of the k-th element in the sample s. Let π_{kl} denotes the joint-inclusion probabilities of the k-th and l-th elements in the sample s. The variance of \hat{\bar{y}}_{NHT} is given by:
V(\hat{\bar{y}}_{NHT}) = \frac{1}{N^2}∑_{k\in U}∑_{l\in U} (π_{kl}-π_kπ_l)\frac{y_k}{π_k}\frac{y_l}{π_l}
which can therefore be estimated by the Horvitz-Thompson variance estimator (implemented by the current function):
\hat{V}(\hat{\bar{y}}_{NHT}) = \frac{1}{N^2}∑_{k\in s}∑_{l\in s} \frac{π_{kl}-π_kπ_l}{π_{kl}}\frac{y_k}{π_k}\frac{y_l}{π_l}
The function returns a value for the estimated variance.
Emilio Lopez Escobar.
Horvitz, D. G. and Thompson, D. J. (1952) A generalization of sampling without replacement from a finite universe. Journal of the American Statistical Association, 47, 663–685.
Narain, R. D. (1951) On sampling without replacement with varying probabilities. Journal of the Indian Society of Agricultural Statistics, 3, 169–175.
VE.SYG.Mean.NHT
VE.Hajek.Mean.NHT
data(oaxaca) #Loads the Oaxaca municipalities dataset pik.U <- Pk.PropNorm.U(373, oaxaca$SURFAC05) #Reconstructs the 1st order incl. probs. s <- oaxaca$sSURFAC #Defines the sample to be used N <- dim(oaxaca)[1] #Defines the population size y1 <- oaxaca$POP10 #Defines the variable of interest y1 y2 <- oaxaca$HOMES10 #Defines the variable of interest y2 #This approximation is only suitable for large-entropy sampling designs pikl.s <- Pkl.Hajek.s(pik.U[s==1]) #Approx. 2nd order incl. probs. from s #Computes the variance estimation of the NHT point estimator for y1 VE.HT.Mean.NHT(y1[s==1], pik.U[s==1], pikl.s, N) #Computes the variance estimation of the NHT point estimator for y2 VE.HT.Mean.NHT(y2[s==1], pik.U[s==1], pikl.s, N)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.