Skip to content

Commit

Permalink
Fix bug in open model simulation
Browse files Browse the repository at this point in the history
  • Loading branch information
kenkellner committed Jul 9, 2024
1 parent 1f49929 commit 84f3dc2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: unmarked
Version: 1.4.1.9003
Date: 2024-06-14
Version: 1.4.1.9004
Date: 2024-07-09
Type: Package
Title: Models for Data from Unmarked Animals
Authors@R: c(
Expand Down
4 changes: 2 additions & 2 deletions R/unmarkedFit.R
Original file line number Diff line number Diff line change
Expand Up @@ -2206,9 +2206,9 @@ simOpenN <- function(object, na.rm)
S <- G <- matrix(NA, M, T-1)
for(i in 1:M) {
switch(mix,
P = N[i, 1] <- rpois(1, lambda),
P = N[i, 1] <- rpois(1, lambda[i]),
NB = N[i, 1] <- rnbinom(1, size =
exp(coef(object["alpha"])), mu = lambda),
exp(coef(object["alpha"])), mu = lambda[i]),
ZIP = N[i,1] <- rzip(1, lambda[i], psi))
if(delta[i, 1] > 1) {
for(d in 2:delta[i, 1]) {
Expand Down

0 comments on commit 84f3dc2

Please sign in to comment.