HTestimator             package:sampling             R Documentation

_T_h_e _H_o_r_v_i_t_z-_T_h_o_m_p_s_o_n _e_s_t_i_m_a_t_o_r

_D_e_s_c_r_i_p_t_i_o_n:

     Compute the Horvitz-Thompson estimator of the population total.

_U_s_a_g_e:

     HTestimator(y,pik,s)

_A_r_g_u_m_e_n_t_s:

       y: vector of the variable of interest; its length is equal to N,
          which is the population size.

     pik: vector of the first-order inclusion probabilities.

       s: vector of size N, , with 0/1 elements, indicating the unit 
          status: 1 - the unit is selected in the sample, 0 -
          otherwise.

_S_e_e _A_l_s_o:

     'UPtille'

_E_x_a_m_p_l_e_s:

     # 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)

