First derivatives of NB2 PMF used in fitNB2
. Code is
taken from the function snbinom()
in the countreg
package
version 0.2-1 (2023-06-13) countregWALS.
snbinom(x, mu, size, parameter = c("mu", "size"), drop = TRUE)
A vector or matrix containing the first derivatives.
Vector of quantiles.
Vector of means.
Vector of dispersion parameter. If a scalar is given, the value is recycled.
Specifies which parameter the derivative is taken for.
parameter = c("mu", "size")
returns a matrix with derivatives
for both parameters.
If TRUE
, drops empty dimensions of return using
drop
. If FALSE
does not apply drop
.