Skip to content

p-gw/ZeroInflation.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ZeroInflation.jl

Stable Dev Build Status Coverage

This package provides simple utilities for constructing zero-inflated distributions. It is mainly intended to for fitting zero-inflated and hurdle models using Turing.jl.

Basic usage

ZeroInflation.jl exports a single function (zeroinflated) that can be used to construct arbitrary zero-inflated distributions. For example to construct a zero-inflated Poisson distribution with parameter λ = 1.0 and mixing probability θ = 0.2, call

zeroinflated(Poisson(1.0), 0.2)

Sometimes it can be useful (e.g. in regression modelling) to express the mixing distribution not in terms of raw probabilities, but on the logit scale. In this case the distribution with parameter λ = 1.0 and mixing probability θ = logistic(0.0) can be constructed by

zeroinflated(Poisson(1.0), StatsFuns.logistic(0.0))

or by directly providing a logit parameterized Bernoulli distribution,

zeroinflated(Poisson(1.0), Turing.BernoulliLogit(0.0))

.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages