| LL_poisson {gspcr} | R Documentation |
Poisson regression log-likelihood
Description
Computes the Poisson regression log-likelihood of a vector of observed values given the GLM systematic component.
Usage
LL_poisson(y, x, mod)
Arguments
y |
numeric vector recording a count dependent variable. |
x |
data.frame (or matrix) containing predictor values. |
mod |
|
Details
If x and y are equal to the data on which mod has been trained, this function returns the same result as the default logLink function. If x and y are new, the function returns the log-likelihood of the new data under the trained model.
Value
A list containing:
-
llan atomic vector of length 1 containing the log-likelihood value. -
scan atomic vector containing the systematic component for the inputxandmod.
Author(s)
Edoardo Costantini, 2023
References
Agresti, A. (2012). Categorical data analysis (Vol. 792). John Wiley & Sons.