Skip to content

Commit

Permalink
Fix the condition to compute the loglikelihood
Browse files Browse the repository at this point in the history
Although the pmf is defined in this interval the
tweedie::dtweedie only works for power greater than
or equal to one.
  • Loading branch information
jreduardo committed Apr 9, 2019
1 parent e237367 commit fdc9aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
# Compute the loglikelihood for Poisson-Tweedie models
`_ptw_loglik` <- function(y, mu, omega, power, npts = 100L) {
# Conditions
if (!(omega >= 0 & (power >= 1 | power <= 0))) {
if (!(omega >= 0 & (power >= 1))) {
ll <- NA
} else {
lli <- vapply(seq(mu), function(i)
Expand Down

0 comments on commit fdc9aa8

Please sign in to comment.