| predictCounts {WALS} | R 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 |
... |
Further parameters passed to |
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 |
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) (Zeileis and Kleiber 2023; Zeileis et al. 2008) 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
Zeileis A, Kleiber C (2023).
countreg: Count Data Regression.
R package version 0.2-1, https://r-forge.r-project.org/projects/countreg/.
Zeileis A, Kleiber C, Jackman S (2008).
“Regression Models for Count Data in R.”
Journal of Statistical Software, 27(8), 1–25.
doi:10.18637/jss.v027.i08.