liknbinom: Negative Binomial Log Likelihood Function

Description Usage Arguments Details Value Examples

Description

The log likelihood of a negative binomial density with data, x, size, prob and mu parameters.

Usage

1
liknbinom(size, prob, mu, x, log = FALSE)

Arguments

size

target for number of successful trials, or dispersion parameter (the shape parameter of the gamma mixing distribution). Must be strictly positive, need not be integer.

prob

probability of success in each trial. 0 < prob <= 1.

mu

alternative parametrization via mean: see ‘Details’.

x

vector of (non-negative integer) quantiles.

log

logical; if TRUE, probabilities p are given as log(p).

Details

The log likelihood is the log of a function of parameters given the data.

Value

A numeric scalar for the log likelihood of the negative binomial density given the data where size, prob, and mu can be held constant or if vector were given vector will be returned.

Examples

1
2
liknbinom(x = rnbinom(n = 2, size = 3, prob = .4),
        size = 3, prob = .4, mu = NULL)

BenBarnard/likelihoodExplore documentation built on Dec. 4, 2019, 4:38 p.m.