View source: R/predictCounts.R
predictCounts | R Documentation |
Predicts the probability of counts given a family object of class
"familyWALScount"
. Only works for count data models.
predictCounts(x, ...)
## S3 method for class 'familyWALScount'
predictCounts(x, yUnique, rowNames, eta, ...)
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 |
"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"
.
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
.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.