predict.CountsEPPM {CountsEPPM}R Documentation

Prediction Method for CountsEPPM Objects

Description

Extract various types of predictions from CountsEPPM regression models.

Usage

## S3 method for class 'CountsEPPM'
predict(object, newdata = NULL,
 type = c("response", "linear.predictor.mean",
 "linear.predictor.scale.factor", "scale.factor",
 "mean", "variance", "distribution", "distribution.parameters"),
 na.action = na.pass, ...)

Arguments

object

fitted model object of class "CountsEPPM".

newdata

optionally, a data frame in which to look for variables with which to predict. If omitted, the original observations are used.

type

character indicating type of predictions: fitted means of responses ("response"), linear predictors ("linear.predictor.mean", "linear.predictor.scale.factor"), fitted value of mean ("mean"), fitted value of scale-factor ("scale.factor"), fitted value of variance ("variance"), fitted probability distribution ("distribution"), parameters of fitted distributions ("distribution.parameters")

na.action

function determining what to do with missing values in newdata. The default is to predict NA.

...

some methods for this generic function require additional arguments.

Value

A vector or list of the predicted values from the fitted model object.

Author(s)

David M. Smith <dmccsmith@verizon.net>

References

Cribari-Neto F, Zeileis A. (2010). Beta Regression in R. Journal of Statistical Software, 34(2), 1-24. doi:10.18637/jss.v034.i02.

See Also

predict.betareg

Examples

data("herons.group") 
output.fn  <- CountsEPPM(number.attempts ~ 0 + group,
 herons.group, model.type = 'mean only', model.name = 'Poisson')
predict(output.fn, type = "response")
predict(output.fn, type = "linear.predictor.mean")

[Package CountsEPPM version 3.1 Index]