View source: R/PLNfit-S3methods.R
predict.PLNfit | R Documentation |
Predict counts of a new sample
## S3 method for class 'PLNfit'
predict(
object,
newdata,
responses = NULL,
level = 1,
type = c("link", "response"),
...
)
object |
an R6 object with class |
newdata |
A data frame in which to look for variables and offsets with which to predict |
responses |
Optional data frame containing the count of the observed variables (matching the names of the provided as data in the PLN function), assuming the interest in in testing the model. |
level |
Optional integer value the level to be used in obtaining the predictions. Level zero corresponds to the population predictions (default if |
type |
The type of prediction required. The default is on the scale of the linear predictors (i.e. log average count) |
... |
additional parameters for S3 compatibility. Not used |
A matrix of predicted log-counts (if type = "link"
) or predicted counts (if type = "response"
).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.