Cen                   package:NADA                   R Documentation

_C_r_e_a_t_e _a _C_e_n_s_o_r_e_d _O_b_j_e_c_t

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

     Create a censored object, usually used as a response variable in a
     model formula.

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

     Cen(obs, censored, type = "left", ...)
     flip(x)

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

     obs: A numeric vector of observations.  This includes both
          censored and uncensored observations. 

censored: A logical vector indicating TRUE where an observation in obs
          is censored (a less-than value) and FALSE otherwise. 

       x: A 'Cen' object constructed using the 'Cen' function. 

     ...: Additional items - none at this time. 

    type: character string specifying the type of censoring. Possible
          values are '"right"', '"left"', '"counting"', '"interval"',
          or '"interval2"'.  The default is '"left"'. 

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

     An object of class 'Cen'.

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

     This, and related routines, are front ends to routines in the
     'survivial' package.  Since the survival routines can not handle
     left-censored data, these routines tranparently handle ``flipping"
     input data and resultant calculations.  

     By default, 'Cen' ``flips" the input data by subtracting a large
     constant that is larger than maximum input value from all
     observations.  It then marks the data as right censored so that
     routines from the 'survival' package can be used.

     The function 'flip' is provided for reversing the flip processes -
     ALTHOUGH all routines that accept 'Cen' objects automatically flip
     resultant calculations back to the origial scale. Thus, 'flip'
     should almost never be used, except perhaps in the development of
     an extension function.

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

     Lopaka(Rob) Lee <rclee@usgs.gov>

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

     Helsel, Dennis R. (2005).  Nondectects and Data Analysis;
     Statistics for censored environmental data.  John Wiley and Sons,
     USA, NJ.

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

     'cenfit'

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

         obs      = c(0.5,    0.5,   1.0,  1.5,   5.0,    10,   100)
         censored = c(TRUE, FALSE, FALSE, TRUE, FALSE, FALSE, FALSE)

         Cen(obs, censored)
         flip(Cen(obs, censored))

