DHNBINOM: Double-Hurdle Model for Negative Binomial Distribution

Description Usage Arguments Value

Description

Density, distribution function, quantile function and random generation for the hurdle model using negative binomial distribution with parameters theta, size, and prob.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
ddhnbinom(
  x,
  theta = 0.5,
  theta_1 = 0.1,
  size = 0.9,
  mu = 0.9,
  scale = 1,
  shape = 1,
  threshold = 3,
  log = FALSE
)

pdhnbinom(
  q,
  theta = 0.5,
  theta_1 = 0.1,
  size = 0.9,
  mu = 0.9,
  scale = 1,
  shape = 1,
  lower.tail = TRUE,
  log.p = FALSE,
  threshold
)

rdhnbinom(
  n,
  theta = 0.5,
  theta_1 = 0.1,
  size = 0.9,
  mu = 0.9,
  scale = 1,
  shape = 1,
  threshold = 3
)

Arguments

x, q

vector of quantiles

theta

zero generating parameter (probability of zeros)

theta_1

probability of a count at or above mu, conditional on non-zero count

size

number of successes (dispersion parameter)

mu

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

scale

scale parameter

shape

shape parameter

threshold

second hurdle

log, log.p

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

lower.tail

logical; if TRUE (default), probabilities are P[X %leq x], otherwise, P[X > x].

n

number of observations

p

vector of probabilities

Value

dhnbinom gives the density, phnbinom gives the distribution function, qhnbinom gives the quantile function, and rhnbinom generates random deviates.


ebalderama/ZimulatE documentation built on Dec. 20, 2021, 3:12 a.m.