Skip to content

Commit

Permalink
Add links to references for ZIP
Browse files Browse the repository at this point in the history
  • Loading branch information
agdenadel committed Feb 27, 2024
1 parent 2ffe926 commit bfaef0c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/estimate_zipoisson.R
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@

# https://en.wikipedia.org/wiki/Zero-inflated_model#Estimators_of_ZIP_parameters
# https://math.stackexchange.com/questions/2761563/maximum-likelihood-estimation-for-zero-inflated-poisson-distribution

Check warning on line 3 in R/estimate_zipoisson.R

View workflow job for this annotation

GitHub Actions / run-lint

file=/github/workspace/R/estimate_zipoisson.R,line=3,col=81,[line_length_linter] Lines should not be more than 80 characters.
# https://ieeexplore.ieee.org/document/9032203
estimate_zi_poisson <- function(data) {
num.zeros <- sum(data == 0)

Check warning on line 6 in R/estimate_zipoisson.R

View workflow job for this annotation

GitHub Actions / run-lint

file=/github/workspace/R/estimate_zipoisson.R,line=6,col=3,[object_name_linter] Variable and function name style should be snake_case or symbols.
r0 <- 1 / length(data) * num.zeros
Expand Down

0 comments on commit bfaef0c

Please sign in to comment.