Learn R Programming

samplingVarEst (version 1.4)

Est.Total.Hajek: The Hajek estimator for a total

Description

Computes the Hajek (1971) estimator for a population total.

Usage

Est.Total.Hajek(VecY.s, VecPk.s, N)

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 the length 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.

N

the population size. It must be an integer or a double-precision scalar with zero-valued fractional part.

Author

Emilio Lopez Escobar.

Details

For the population total of the variable \(y\): $$t = \sum_{k\in U} y_k$$ the approximately unbiased Hajek (1971) estimator of \(t\) (implemented by the current function) is given by: $$\hat{t}_{Hajek} = N \frac{\sum_{k\in s} w_k y_k}{\sum_{k\in s} w_k}$$ where \(w_k=1/\pi_k\) and \(\pi_k\) denotes the inclusion probability of the \(k\)-th element in the sample \(s\).

References

Hajek, J. (1971) Comment on An essay on the logical foundations of survey sampling by Basu, D. in Foundations of Statistical Inference (Godambe, V.P. and Sprott, D.A. eds.), p. 236. Holt, Rinehart and Winston.

See Also

Est.Total.NHT
VE.Jk.Tukey.Total.Hajek
VE.Jk.CBS.HT.Total.Hajek
VE.Jk.CBS.SYG.Total.Hajek
VE.Jk.B.Total.Hajek
VE.Jk.EB.SW2.Total.Hajek

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
N     <- dim(oaxaca)[1]                     #Defines the population size
y1    <- oaxaca$POP10                       #Defines the variable y1
y2    <- oaxaca$HOMES10                     #Defines the variable y2
Est.Total.Hajek(y1[s==1], pik.U[s==1], N)   #The Hajek estimator for y1
Est.Total.Hajek(y2[s==1], pik.U[s==1], N)   #The Hajek estimator for y2

Run the code above in your browser using DataLab