Est_EmpDistFunc_Hajek: The Hajek estimator for the empirical cumulative distribution...

Est.EmpDistFunc.HajekR Documentation

The Hajek estimator for the empirical cumulative distribution function

Description

Computes the Hajek (1971) estimator for the empirical cumulative distribution function (ECDF).

Usage

Est.EmpDistFunc.Hajek(VecY.s, VecPk.s, t)

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.

t

value to be evaluated for the empirical cumulative distribution function. It must be an integer or a double-precision scalar.

Details

For the population empirical cumulative distribution function (ECDF) of the variable y at the value t:

Fn(t) = \frac{\#(k\in U:y_k ≤q t)}{N} = \frac{1}{N} ∑_{k\in U} I(y_k ≤q t)

the approximately unbiased Hajek (1971) estimator of Fn(t) (implemented by the current function) is given by:

\hat{F}n_{Hajek}(t) = \frac{∑_{k\in s} w_k I(y_k ≤q t)}{∑_{k\in s} w_k}

where I(y_k ≤q t) denotes the indicator function that takes the value 1 if y_k ≤q t and the value 0 otherwise, and where w_k=1/π_k and π_k denotes the inclusion probability of the k-th element in the sample s.

Value

The function returns a value for the empirical cumulative distribution function evaluated at t.

Author(s)

Emilio Lopez Escobar [aut, cre], Juan Francisco Munoz Rosas [ctb].

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.EmpDistFunc.NHT

Examples

data(oaxaca)                                      #Loads Oaxaca municipalities dataset
pik.U <- Pk.PropNorm.U(373, oaxaca$HOMES00)       #Reconstructs the inclusion probs.
s     <- oaxaca$sHOMES00                          #Defines the sample to be used
y1    <- oaxaca$POP10                             #Defines the variable of interest y1
Est.EmpDistFunc.Hajek(y1[s==1], pik.U[s==1], 950) #Hajek est. of ECDF for y1 at t=950

samplingVarEst documentation built on Jan. 14, 2023, 5:08 p.m.