Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Hajekestimator

The Hajek estimator


Description

Computes the Hájek estimator of the population total or population mean.

Usage

Hajekestimator(y,pik,N=NULL,type=c("total","mean"))

Arguments

y

vector of the variable of interest; its length is equal to n, the sample size.

pik

vector of the first-order inclusion probabilities; its length is equal to n, the sample size.

N

population size; N is only used for the total estimator; for the mean estimator its value is NULL.

type

the estimator type: total or mean.

See Also

Examples

# Belgian municipalities data base
data(belgianmunicipalities)
# Computes the inclusion probabilities
pik=inclusionprobabilities(belgianmunicipalities$Tot04,200)
N=length(pik)
n=sum(pik)
# Defines the variable of interest
y=belgianmunicipalities$TaxableIncome
# Draws a Poisson sample of expected size 200
s=UPpoisson(pik)
# Computes the Hajek estimator of the population mean
Hajekestimator(y[s==1],pik[s==1],type="mean")
# Computes the Hajek estimator of the population total
Hajekestimator(y[s==1],pik[s==1],N=N,type="total")

sampling

Survey Sampling

v2.9
GPL (>= 2)
Authors
Yves Till<e9> <yves.tille@unine.ch>, Alina Matei <alina.matei@unine.ch>
Initial release
2021-01-12

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.