hare                package:polspline                R Documentation

_H_a_r_e: _h_a_z_a_r_d _r_e_g_r_e_s_s_i_o_n

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

     Fit a hazard regression model: linear splines are used to model
     the baseline hazard, covariates, and interactions. Fitted models
     can be, but do not need to be, proportional hazards models.

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

     hare(data, delta, cov, penalty, maxdim, exclude, include, prophaz = FALSE,
     additive = FALSE, linear, fit, 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.  

     cov: covariates: matrix with as many rows as the length of 'data'.
          May be omitted  if there are no covariates. (If there are no
          covariates, however, 'heft' will provide a more flexible
          model using cubic splines.) 

 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.hare'.  

  maxdim: maximum dimension (default is '6 * length(data)^0.2'.  

 exclude: combinations to be excluded - this should be a matrix with 2 
          columns - if for example 'exclude[1, 1] = 2' and 'exclude[1,
          2] = 3' no  interaction between covariate 2 and 3 is
          included. 0 represents time.  

 include: those combinations that can be included. Should have the same
          format  as 'exclude'. Only one of 'exclude' and 'include' can
          be specified . 

 prophaz: should the model selection be restricted to proportional
          hazards models?  

additive: should the model selection be restricted to additive models?  

  linear: vector indicating for which of the variables no knots should 
          be entered. For example, if 'linear = c(2, 3)' no knots for
          either covariate  2 or 3 are entered. 0 represents time. The
          default is none. 

     fit: 'hare' object. If  'fit' is specified, 'hare' adds  basis
          functions starting with those in 'fit'.  

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

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

     An object of class 'hare', which is organized to serve as input
     for 'plot.hare',  'summary.hare', 'dhare' (conditional density),
     'hhare' (conditional hazard rate), 'phare' (conditional
     probabilities), 'qhare' (conditional quantiles), and 'rhare'
     (random numbers).  The object is a list with the following
     members:  

    ncov: number of covariates.  

    ndim: number of dimensions of the fitted model.  

    fcts: matrix of size 'ndim x 6'. each row is a basis function. 
          First element: first covariate involved (0 means time); 

          second element: which knot (0 means: constant (time) or
          linear (covariate)); 

          third element: second covariate involved ('NA' means: this is
          a function of one variable); 

          fourth element: knot involved (if the third element is 'NA',
          of no relevance); 

          fifth element: beta; 

          sixth element: standard error of beta.

   knots: a matrix with 'ncov' rows. Covariate 'i' has row 'i+1', time
          has row 1.  First column: number of knots in this dimension;
          other columns: the knots, appended with 'NA's to make it a
          matrix. 

 penalty: the parameter used in the AIC criterion.

     max: maximum element of survival data.

  ranges: column 'i' gives the range of the 'i'-th covariate.

    logl: matrix with two columns. The 'i'-th element of the first
          column   is the loglikelihood of the model of dimension 'i'.
          The second column indicates whether this  model was fitted
          during the addition stage (1) or during the deletion stage
          (0).  

  sample: sample size.

_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:

     'heft', 'plot.hare', 'summary.hare', 'dhare', 'hhare', 'phare',
     'qhare', 'rhare'.

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

     fit <- hare(testhare[,1], testhare[,2], testhare[,3:8]) 

