HTestimator(y,pik,s)
UPtille
# Belgian municipalities data base
b=data(belgianmunicipalities)
# Compute the inclusion probabilities
pik=inclusionprobabilities(belgianmunicipalities$Tot04,200)
N=length(pik)
n=sum(pik)
# Define the variable of interest
y=belgianmunicipalities$TaxableIncome
# Draw a Poisson sample of expected size 200
s=UPpoisson(pik)
# Compute the Horvitz-Thompson estimator
HTestimator(y,pik,s)
Run the code above in your browser using DataLab