heft                package:polspline                R Documentation

_H_e_f_t: _h_a_z_a_r_d _e_s_t_i_m_a_t_i_o_n _w_i_t_h _f_l_e_x_i_b_l_e _t_a_i_l_s

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

     Hazard estimation using cubic splines to  approximate the
     log-hazard function and special functions to allow non-polynomial
     shapes in both tails.

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

     heft(data, delta, penalty, knots, leftlin, shift, leftlog,
     rightlog, maxknots, mindist, silent = TRUE) 

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

    data: vector of observations. Observations may or may not be right
          censored. All observations should be nonnegative. 

   delta: binary vector with the same length as 'data'. Elements of
          'data' for which the corresponding element of 'delta' is 0
          are assumed to be right censored, elements of 'data' for
          which the corresponding element of 'delta' is 1 are assumed
          to be uncensored. If 'delta' is missing, all observations are
          assumed to be uncensored. 

 penalty: the parameter to be used in the AIC criterion. The method
          chooses the number of knots that minimizes '-2 *
          loglikelihood + penalty * (dimension)'. The default is to use
          'penalty = log(samplesize)' as in BIC. The effect of this
          parameter is summarized in 'summary.heft'. 

   knots: ordered vector of values, which forces the method to start
          with these knots.  If 'knots' is not specified, a default
          knot-placement rule is employed.  

 leftlin: if 'leftlin' is 'TRUE' an extra basis-function, which is
          linear to the left  of the first knot, is included in the
          basis.  If any of 'data' is exactly 0, the default of
          'leftlin' is 'TRUE', otherwise it is 'FALSE'. 

   shift: parameter for the log terms. Default is 'quantile(data[delta
          == 1], .75)'.  

 leftlog: coefficient of 'log(x/(x+shift))', which must be greater than
           '-1'.  (In particular, if 'leftlog' equals zero no 
          'log(x/(x+shift))' term  is included.) If 'leftlog' is
          missing its maximum likelihood estimate is used.  If any of
          'data' is exactly zero, 'leftlog' is   set to zero.  

rightlog: coefficient of 'log(x+shift)', which must be greater than 
          '-1'. (In particular, if 'leftlog' equals zero no  
          'log(x+shift)' term is included.) If 'rightlog' is missing
          its maximum likelihood estimate is used.  

maxknots: maximum number of knots allowed in the model (default is  '4
          * n^0.2', where n is the length of 'data'. 

 mindist: minimum distance in order statistics between knots. The
          default is 5.  

  silent: suppresses the printing of diagnostic output about knots
          added or deleted,  Rao-statistics, Wald-statistics and
          log-likelihoods.  

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

     An object of class 'heft', which is organized to serve as input
     for 'plot.heft', 'summary.heft', 'dheft' (density), 'hheft'
     (hazard rate), 'pheft' (probabilities), 'qheft' (quantiles), and
     'rheft' (random numbers). The object is a list with the following
     members: 

  knots : vector of the locations of the knots in the 'heft' model.  

    logl: the 'k'-th element is the log-likelihood of the fit with 'k'
          knots.  

  thetak: coefficients of the knot part of the  spline. The k-th
          coefficient is the coefficient  of  (x-t(k))^3_+. If a
          coefficient is zero the corresponding  knot was considered
          and then deleted from the model.  

  thetap: coefficients of the polynomial part of the spline.  The first
          element is the constant term and  the second element is the
          linear term.  

  thetal: coefficients of the logarithmic terms. The first element
          equals  'leftlog' and the second element equals 'rightlog'.  

 penalty: the penalty that was used.  

   shift: parameter used in the definition of the log terms.  

  sample: the sample size.  

   logse: the standard errors of 'thetal'.  

     max: the largest element of data.  

      ad: vector indicating whether a model of this dimension  was not
          fit (2), fit during the addition stage (0) or during  the
          deletion stage (1).  

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

     Charles Kooperberg clk@fhcrc.org.

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

     Charles Kooperberg, Charles J. Stone and Young K. Truong (1995).
     Hazard regression.  _Journal of the American Statistical
     Association_, *90*, 78-94.

     Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K.
     Truong. The use of polynomial splines and their tensor products in
     extended linear modeling (with discussion) (1997).  _Annals of
     Statistics_, *25*, 1371-1470.

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

     'hare', 'plot.heft', 'summary.heft', 'dheft', 'hheft', 'pheft',
     'qheft', 'rheft'.

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

     fit1 <- heft(testhare[,1], testhare[,2])
     # modify tail behavior
     fit2 <- heft(testhare[,1], testhare[,2], leftlog = FALSE, rightlog = FALSE, 
               leftlin = TRUE)   
     fit3 <- heft(testhare[,1], testhare[,2], penalty = 0)   # select largest model

