dzip: Zero-Inflated Poisson Density Evaluation

View source: R/functions.R

dzipR Documentation

Zero-Inflated Poisson Density Evaluation

Description

Calculates the density of a zero-inflated poisson model at given data points for a set of parameter values

Usage

dzip(obs, lambda, psi, log = T)

Arguments

obs

The observations. Can be a matrix or vector, and may contain NAs

lambda

The vector of means for each observation. Must have the same length as obs

psi

The probability of being from the poisson distribution as opposed to being an 'inflated' 0

log

A boolean, if TRUE the function returns the logs of the densities instead

Value

A vector (or matrix) of the same length (dimension) as obs, with the density or log density of the zero-inflated poisson evaluated at each point.


calliste-fagard-jenkin/GAI documentation built on July 26, 2022, 11:20 a.m.