Closed kenkellner closed 4 years ago
When running this simulate method in parboot the design matrices are generated without cleaning up NAs. This can result in missing values for the lambda vector:
parboot
https://github.com/rbchan/unmarked/blob/1034723788e450d59d73d3c52b18e612b42474e6/R/unmarkedFit.R#L4371
Eventually these NAs reach the size argument of rmultinom which errors instead of returning another NA (unlike most random number functions in R?)
rmultinom
https://github.com/rbchan/unmarked/blob/1034723788e450d59d73d3c52b18e612b42474e6/R/unmarkedFit.R#L4412
Probably need to put a check in here and skip running rmultinom when lambda = NA and directly set the value of y to NA.
lambda = NA
y
NA
When running this simulate method in
parboot
the design matrices are generated without cleaning up NAs. This can result in missing values for the lambda vector:https://github.com/rbchan/unmarked/blob/1034723788e450d59d73d3c52b18e612b42474e6/R/unmarkedFit.R#L4371
Eventually these NAs reach the size argument of
rmultinom
which errors instead of returning another NA (unlike most random number functions in R?)https://github.com/rbchan/unmarked/blob/1034723788e450d59d73d3c52b18e612b42474e6/R/unmarkedFit.R#L4412
Probably need to put a check in here and skip running
rmultinom
whenlambda = NA
and directly set the value ofy
toNA
.