d011ch                package:dblcens                R Documentation

_C_o_m_p_u_t_e _N_P_M_L_E _o_f _C_D_F _f_r_o_m _d_o_u_b_l_y _c_e_n_s_o_r_e_d _d_a_t_a, _w_i_t_h _a _c_o_n_s_t_r_a_i_n_t

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

     'd011ch' computes the NPMLE of CDF, with and without a 
     constraint, from doubly censored data. It uses EM algorithm
     starting from an initial estimator that have jumps at uncensored
     points as well as the mid point of those censoring times that has
     pattern of (0,2), (see below for definition  and example.)

     When there are ties, the left (right) censored points are treated
     as happened before (after), to break tie. Also the last right
     censored observation and first left censored observations are
     changed to uncensored, in order to obtain a proper distribution as
     estimator. (though this can be modified easily as they are written
     in R language).

     It also computes the -2 log likelihood ratio based on the
     empirical likelihood  for testing the constraint via empirical
     likelihood theorem, i.e. under Ho it should be chi-square with
     df=1.

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

      d011ch(z, d, K, konst, identical=rep(0,length(z), maxiter=49, error=0.00001)

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

       z: a vector of length n denoting observed times, (ties
          permitted)

       d: a vector of length n that contains censoring indicator: d= 2
          or 1 or 0, (according to z being left, not, right censored)

       K: the constraint time.

   konst: the constraint value, i.e. F(K)=konst.

identical: optional. a vector of length n that has values  either 0 or
          1. identical[i]=1 means even if $(z[i],d[i])$ is identical
          with $(z[j],d[j])$, for some $j \not= i$, they still stay as
          2  observations, not 1 obs. with weight 2, which only happen
          if identical[i]=0 and identical[j] =0. One reason for this is
          because they may have different covariates not shown here.
          This flexibility may be useful for regression applications.
          Default value is  identical = 0. 

 maxiter: optional integer value. default to 49

   error: optional. Default to 0.00001

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

     a list contain the NPMLE of CDF with and without the constraint,
     -2loglik ratio and other informations. 

    time: survival times. Those corresponding to d=2 are removed. Those
          corresponding to (0,2) censoring pattern are added, at
          mid-point.

  status: Censoring status of the above times. Since left censored 
          times are removed, there is no status =2. There may be -1,
          indicating  that this is an added time for (0,2) censoring
          pattern. 

    surv: The survival function at the above times.

    jump: Jumps of NPMLE at the above times.

 exttime: Similar to time but now include the left censored times. 

extstatus: Censoring status of exttime. -1 has same meaning as status
          before.

 extjump: Jumps of the unconstrained NPMLE on extended times.

extsurv.Sx: Survival probability at exttime.

konstdist: The constrained NPMLE of distribution.

konstjump: Jumps of the constrained NPMLE of CDF.

konsttime: Location of the constraint, same as K in the input.

   theta: is the same value 'konst' in the input.

"-2loglikR": the Wilks statistics.  Distributed approximately
          chi-square df=1 under Ho

 maxiter: the actual number of iterations for the unconstrained NPNLE.
          The constrained NPMLE usually took less iterations to
          converge.

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

     Kun Chen,  Mai Zhou mai@ms.uky.edu

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

     Chang, M. N. and Yang, G. L. (1987). Strong consistency of a
     nonparametric estimator of the survival function with doubly
     censored data. Ann. Statist. 15, 1536-1547.

     Murphy, S. and Van der Varrt. (1997). Semiparametric Likelihood
     Ratio Inference. Ann. Statist. 25, 1471-1509.

     Chen, K. and Zhou, M. (2000).  Nonparametric Hypothesis Testing
     and Confidence Intervals with Doubly Censored Data. Tech Report, 
     Univ. of Kentucky.

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

     d011ch(z=c(1,2,3,4,5), d=c(1,0,2,2,1), K=3.5, konst=0.6)
     #
     # you should get something like
     #
     #       $time:
     #       [1] 1.0 2.0 2.5 5.0    (notice the times, (3,4), corresponding
     #                                   to d=2 are removed, and time 2.5 added
     #       $status:               since there is a (0,2) pattern at
     #       [1]  1  0 -1  1        times 2, 3. The status indicator of -1
     #                                   show that it is an added time )
     #       $surv
     #       [1] 0.5000351 0.5000351 0.3333177 0.0000000
     #
     #       $jump
     #       [1] 0.4999649 0.0000000 0.1667174 0.3333177
     #
     #       $exttime
     #       [1] 1.0 2.0 2.5 3.0 4.0 5.0       (exttime include all the times,
     #                                         censor or not, plus the added time)
     #       $extstatus
     #       [1]  1  0 -1  2  2  1
     #
     #       $extjump
     #       [1] 0.4999649 0.0000000 0.1667174 0.0000000 0.0000000 0.3333177
     #
     #       $extsurv.Sx
     #       [1] 0.5000351 0.5000351 0.3333177 0.3333177 0.3333177 0.0000000
     #
     #       $konstdist
     #       [1] 0.4999365 0.4999365 0.6000000 0.6000000 0.6000000 1.0000000
     #
     #       $konstjump
     #       [1] 0.4999365 0.0000000 0.1000635 0.0000000 0.0000000 0.4000000
     #
     #       $konsttime
     #       [1] 3.5
     #
     #       $theta
     #       [1] 0.6
     #
     #       $"-2loglikR"                  (the Wilks statistics to test Ho:
     #       [1] 0.05679897                  F(K)=konst)
     #
     #       $maxiter
     #       [1] 33

