predictCount function

Predicted Counts for a Generalized Linear Model

Predicted Counts for a Generalized Linear Model

Uses the main output and some error messages from R function 'predict' but gives you more output. (Error messages are not reliable when used in Splus.)

predictCount(object, newdata, cilevel = 0.95, digit = 3, print.out = TRUE, ...)

Arguments

  • object: a glm object, i.e. the output from glm.
  • newdata: prediction data frame.
  • cilevel: confidence level of the interval.
  • digit: decimal numbers after the point.
  • print.out: if TRUE, print out the prediction matrix.
  • ...: optional arguments that are passed to the generic predict.

Returns

A data frame with three columns:

  • Predicted: the predicted count.
  • Conf.lower: the lower bound of the predicted count.
  • Conf.upper: the upper bound of the predicted count.

Details

Note: The data frame, newdata, must have the same column order and data types (e.g. numeric or factor) as those used in fitting the model.

See Also

predict, predict.glm, as.data.frame.

  • Maintainer: James Curran
  • License: GPL-2 | file LICENSE
  • Last published: 2023-08-21