Predicts the probability of counts given a family object of class
"familyWALScount"
. Only works for count data models.
predictCounts(x, ...)# S3 method for familyWALScount
predictCounts(x, yUnique, rowNames, eta, ...)
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
.
object of class "familyWALScount"
.
Further parameters passed to density()
function in
family
.
vector. The counts (larger or equal to zero) which to predict probabilities for.
vector. The names of the observations.
vector. The fitted linear link \(\hat{\eta}\) of the model.
"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) countreg,countreghurdleWALS using the argument
type = "prob"
.