Learn R Programming

samplingVarEst (version 1.5)

Est.Total.NHT: The Narain-Horvitz-Thompson estimator for a total

Description

Computes the Narain (1951); Horvitz-Thompson (1952) estimator for a population total.

Usage

Est.Total.NHT(VecY.s, VecPk.s)

Value

The function returns a value for the total point estimator.

Arguments

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. There must not be missing values.

VecPk.s

vector of the first-order inclusion probabilities; its length is equal to \(n\), the sample size. Values in VecPk.s must be greater than zero and less than or equal to one. There must not be missing values.

Author

Emilio Lopez Escobar.

Details

For the population total of the variable \(y\): $$t = \sum_{k\in U} y_k$$ the unbiased Narain (1951); Horvitz-Thompson (1952) estimator of \(t\) (implemented by the current function) is given by: $$\hat{t}_{NHT} = \sum_{k\in s} \frac{y_k}{\pi_k}$$ where \(\pi_k\) denotes the inclusion probability of the \(k\)-th element in the sample \(s\).

References

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.

See Also

Est.Total.Hajek
VE.HT.Total.NHT
VE.SYG.Total.NHT
VE.Hajek.Total.NHT

Examples

Run this code
data(oaxaca)                                #Loads the Oaxaca municipalities dataset
pik.U <- Pk.PropNorm.U(373, oaxaca$HOMES00) #Reconstructs the 1st order incl. probs.
s     <- oaxaca$sHOMES00                    #Defines the sample to be used
y1    <- oaxaca$POP10                       #Defines the variable of interest y1
y2    <- oaxaca$HOMES10                     #Defines the variable of interest y2
Est.Total.NHT(y1[s==1], pik.U[s==1])        #Computes the NHT estimator for y1
Est.Total.NHT(y2[s==1], pik.U[s==1])        #Computes the NHT estimator for y2

Run the code above in your browser using DataLab