Learn R Programming

rpart (version 3.1-9)

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

Description

Set up for poisson method for an rpart model.

Usage

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

Arguments

y
the responses, a vector or a two-column matrix. If a matrix the first column is the observation times and the second is the counts.
offset
an offset, or NULL. The offset is interpreted as a log observation time.
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.poisson is used only by the function rpart.