Learn R Programming

hurdlr (version 0.1)

loglik_zip: Zero-inflated Poisson Data Likelihood

Description

Data likelihood fuction for zero-inflated Poisson model regression using zero_poisson.

Usage

loglik_zip(y, z, lam, p)

Arguments

y

numeric response vector.

z

vector of binary operators. z == 0 for observations considered belnging to the negative binomial distribution, z == 1 for observations considered to be 'extra' zeros.

lam

current value for the Poisson likelihood lambda parameter.

p

vector of 'extra' zero-count probabilities.

Value

The log-likelihood of the zero-inflated Poisson fit for the current iteration of the MCMC algorithm.

See Also

zero_poisson