cenmle                 package:NADA                 R Documentation

_R_e_g_r_e_s_s_i_o_n _b_y _M_a_x_i_m_u_m _L_i_k_e_l_i_h_o_o_d _E_s_t_i_m_a_t_i_o_n _f_o_r _L_e_f_t-_c_e_n_s_o_r_e_d _D_a_t_a

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

     Regression by Maximum Likelihood (ML) Estimation for left-censored
     ("nondetect" or "less-than") data.  This routine computes
     regression estimates of slope(s) and intercept by maximum
     likelihood when data are left-censored.  It will compute ML
     estimates of descriptive statistics when explanatory variables
     following the ~ are left blank.  It will compute ML tests similar
     in function and assumptions to two-sample t-tests and analysis of
     variance when groups are specified following the ~.  It will
     compute regression equations, including multiple regression, when
     continuous explanatory variables are included following the ~.  It
     will compute the ML equivalent of analysis of covariance when both
     group and continuous explanatory variables are specified following
     the ~.  To avoid an appreciable loss of power with regression and
     group hypothesis tests, a probability plot of residuals should be
     checked to ensure that residuals from the regression model are
     approximately gaussian.

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

         cenmle(obs, censored, groups, ...)

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

     obs: Either a numeric vector of observations or a formula. See
          examples below. 

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

  groups: A factor vector used for grouping `obs' into subsets. 

     ...: Additional items that are common to this function and the
          'survreg' function from the `survival' package.  The most
          important of which is `dist' and `conf.int'.  See Details
          below. 

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

     This routine is a front end to the 'survreg' routine in the
     'survival' package.  

     There are many additional options that are supported and
     documented in 'survfit'.  Only a few have relevance to the
     evironmental sciences.

     A very important option is `dist' which specifies the
     distributional model to use in the regression.  The default is
     `lognormal'.  

     Another important option is `conf.int'.  This is NOT an option to
     'survreg' but is an added feature (due to some arcane details of R
     it can't be documented above).  The `conf.int' option specifies
     the level for a two-sided confidence interval on the regression.
     The default is 0.95.  This interval will be used in when the
     output object is passed to other generic functions such as 'mean'
     and 'quantile'.  See Examples below.

     Also supported is a `gaussian' or a normal distribution.  The use
     of a gaussian distribution requires an interval censoring context
     for left-censored data.  Luckily, this routine automatically does
     this for you - simply specify `gaussian' and the correct
     manipulations are done.

     If any other distribution is specified besides lognormal or
     gaussian,  the return object is a raw survreg object - it is up to
     the user to `do the right thing' with the output (and input for
     that matter).

     If you are using the formula interface:  The 'censored' and
     'groups' parameters are not specified - all information is
     provided via a formula as the 'obs' parameter.  The formula must
     have a 'Cen' object as the response on the left of the '~'
     operator and, if desired, terms separated by + operators on the
     right.   See Examples below.

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

     a 'cenmle' object. Methods defined for 'cenmle' objects are
     provided for 'mean', 'median', 'sd'.

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

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

     Dennis Helsel <dhelsel@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:

     'Cen',  'cenmle-methods', 'mean-methods',  'sd-methods', 
     'median-methods',  'quantile-methods',  'summary-methods'

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

         # Create a MLE regression object 

         data(TCEReg)

         tcemle = with(TCEReg, cenmle(TCEConc, TCECen)) 

         summary(tcemle)
         median(tcemle)
         mean(tcemle)
         sd(tcemle)
         quantile(tcemle)

         # This time specifiy a different confidence interval
         tcemle = with(TCEReg, cenmle(TCEConc, TCECen, conf.int=0.80)) 

         # Use the model's confidence interval with the quantile function
         quantile(tcemle, conf.int=TRUE)

         # With groupings
         with(TCEReg, cenmle(TCEConc, TCECen, PopDensity)) 

