WRegEst                package:emplik                R Documentation

_C_o_m_p_u_t_e _t_h_e _c_a_s_e_w_i_s_e _w_e_i_g_h_t_e_d _r_e_g_r_e_s_s_i_o_n _e_s_t_i_m_a_t_o_r _f_o_r _A_F_T _m_o_d_e_l

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

     For the AFT model, this function computes the case weighted
     estimator of beta. Either the least squares estimator or the
     regression quantile estimator.

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

     WRegEst(x, y, delta, LS=TRUE, tau=0.5)

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

       x: a matrix of size N by q. 

       y: a vector of length N, containing the censored responses.

   delta: a vector (length N) of either 1's or 0's.  d=1 means y is
          uncensored; d=0 means y is right censored. 

      LS: a logical value. If TRUE then the function will  return the
          least squares estimator. If FALSE then the function will
          return the regression quantile estimator, with quantile
          specified by tau. 

     tau: a scalar, between 0 and 1. The quantile to be used in
          quantile regression. If LS=TRUE, then it is ignored.

_D_e_t_a_i_l_s:

     Due to the readily available minimizer, we only provide least
     squares and quantile regression here. However, in the companion
     testing function 'WRegTest ' the user can supply a self defined
     psi function, corresponding to the general M-estimation in the
     regression modeling. (since there is no minimization needed)

     The estimator is the minimizer of

                  sum_{i=1}^n w_i rho (Y_i - X_i b)


     Assuming a correlation model Y_i = X_i beta + sigma(X_i) epsilon_i
     .

_V_a_l_u_e:

     The estimator  hat beta.

_A_u_t_h_o_r(_s):

     Mai Zhou.

_R_e_f_e_r_e_n_c_e_s:

     Zhou, M.; Bathke, A. and Kim, M. (2006).  Empirical likelihood
     analysis of the Heteroscastic AFT model. Dept. of Statistics,
     Univ. of Kentucky Tech. Report.

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

     if(require("rankreg", quietly = TRUE)) {
     ####library(rankreg)
     data(smallcell)
     WRegEst(x=cbind(1,smallcell[,1],smallcell[,2]), 
             y=smallcell[,3], delta=smallcell[,4]) 
     ####################################################
     #### you should get         x1         x2         x3
     ####                 -59.22126 -488.41306   16.03259
     ####################################################
     WRegEst(x=cbind(1,smallcell[,1],smallcell[,2]), 
             y=log10(smallcell[,3]), delta=smallcell[,4], LS=FALSE) 
     ########################################################
     #### you should get      
     ####     [1]     2.603342985  -0.263000044  0.003836832
     ########################################################
     xx <- c(28,-44,29,30,26,27,22,23,33,16,24,29,24,40,21,31,34,-2,25,19)
     }

