checkcalibration          package:sampling          R Documentation

_C_h_e_c_k _c_a_l_i_b_r_a_t_i_o_n

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

     Check the validity of the calibration. In some cases, the
     regression or the raking ratio estimators do not exist, and the
     g-weights do not allow calibration. The function returns 'TRUE' or
     'FALSE'.

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

     checkcalibration(Xs,pik,t,g)

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

      Xs: matrix of calibration variables.

     pik: vector of inclusion probabilities.

       t: vector of population totals.

       g: vector of g-weights.

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

     'regressionestimator', 'rakingratio', 'boundedrakingratio',
     'boundedregressionestimator'

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

     # matrix of auxiliary variables
     Xs=cbind(c(1,1,1,1,1,0,0,0,0,0),c(0,0,0,0,0,1,1,1,1,1),c(1,2,3,4,5,6,7,8,9,10))
     # inclusion probabilities
     pik=rep(0.2,times=10)
     # vector of totals
     t=c(24,26,280)
     # the g-weights
     g=rakingratio(Xs,pik,t)
     # the calibration estimator is equal to t
     checkcalibration(Xs,pik,t,g)
     # We change the vector t 
     t=c(24,26,1000)
     g=rakingratio(Xs,pik,t)
     # with this vector t, the calibration is impossible
     checkcalibration(Xs,pik,t,g)

