Skip to content

Commit

Permalink
Patch CDF equation HurdleNegativeBinomial (#96)
Browse files Browse the repository at this point in the history
* fix equation for CDF of HurdleNegativeBinomial (analogous to fix of HurdlePoisson by @dkwhu)

* re-run devtools::document() for updated in CDF equation in HurdlePoisson and HurdleNegativeBinomial

* include CDF fixes in NEWS
  • Loading branch information
zeileis authored Oct 8, 2022
1 parent 32bf3ea commit 7d2338c
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# distributions3 (development version)

- Fixed errors in notation of cumulative distribution function in the documentation of
`HurdlePoisson()` and `HurdleNegativeBinomial()` (by @dkwhu in #94 and #96).


# distributions3 0.2.1

- New generics `is_discrete()` and `is_continous()` with methods for all distribution objects
Expand Down
4 changes: 2 additions & 2 deletions R/HurdleNegativeBinomial.R
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ rhnbinom <- function(n, mu, theta, size, pi) {
#' **Cumulative distribution function (c.d.f.)**: \eqn{P(X \le 0) = 1 - \pi} and for \eqn{k > 0}
#'
#' \deqn{
#' P(X = k) = 1 - \pi + \pi \cdot \frac{F(k; \mu, \theta)}{1 - F(0; \mu, \theta)}
#' P(X \le k) = 1 - \pi + \pi \cdot \frac{F(k; \mu, \theta) - F(0; \mu, \theta)}{1 - F(0; \mu, \theta)}
#' }{
#' P(X = k) = 1 - \pi + \pi \cdot F(k; \mu, \theta)/(1 - F(0; \mu, \theta))
#' P(X \le k) = 1 - \pi + \pi \cdot (F(k; \mu, \theta) - F(0; \mu, \theta))/(1 - F(0; \mu, \theta))
#' }
#'
#' **Moment generating function (m.g.f.)**:
Expand Down
4 changes: 2 additions & 2 deletions man/HurdleNegativeBinomial.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/HurdlePoisson.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7d2338c

Please sign in to comment.