Learn R Programming

rpart (version 3.1-9)

rpart.exp: Set up for `exp' Method for an Rpart Model

Description

Set up for the exp method for an rpart model.

Usage

rpart.exp(y, offset, parms, wt)

Arguments

y
the responses, a vector or a two-column matrix.
offset
an offset, or NULL.
parms
a list of parameters.
wt
case weights.

Value

  • Returns a list consisting of
  • ya matrix giving the observation times and number of events,
  • parmsa named list of parameters, with components shrink and method (1 for "deviance", 2 for "sqrt"),
  • numrespthe number of responses, here 2,
  • numythe number of columns in y, here 2,
  • summarya function to be invoked by summary.rpart,
  • texta function to be invoked by text.rpart.

Details

rpart.exp is used only by the function rpart. It transforms the data to look like a unit-rate Poisson process so that the rpart.exp method can be used.