predictCounts: Internal methods: Predict probability for counts

View source: R/predictCounts.R

predictCountsR Documentation

Internal methods: Predict probability for counts

Description

Predicts the probability of counts given a family object of class "familyWALScount". Only works for count data models.

Usage

predictCounts(x, ...)

## S3 method for class 'familyWALScount'
predictCounts(x, yUnique, rowNames, eta, ...)

Arguments

x

object of class "familyWALScount".

...

Further parameters passed to density() function in family.

yUnique

vector. The counts (larger or equal to zero) which to predict probabilities for.

rowNames

vector. The names of the observations.

eta

vector. The fitted linear link \hat{\eta} of the model.

Details

"familyWALScount" objects are used in the fitting methods walsNB, walsNBmatrix, walsGLM or walsGLMmatrix. For the latter two, only the family poissonWALS is currently supported.

predictCounts() is not available for objects of any class except for "familyWALScount".

The predictCounts.familyWALScount() method is a modified version of the predict.hurdle() method from the countreg package version 0.2-1 (2023-06-13) \insertCitecountreg,countreghurdleWALS using the argument type = "prob".

Value

Returns a matrix of dimension length(eta) times length{yUnique} with the predicted probabilities of the counts given in yUnique for every observation in eta.

References

\insertAllCited

WALS documentation built on June 22, 2024, 9:42 a.m.

Related to predictCounts in WALS...