Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schnute error with 0 catch in last run #26

Closed
droglenc opened this issue Dec 2, 2016 · 1 comment
Closed

Schnute error with 0 catch in last run #26

droglenc opened this issue Dec 2, 2016 · 1 comment
Assignees

Comments

@droglenc
Copy link
Owner

@droglenc droglenc commented Dec 2, 2016

> catch = c(4,2,0)
> schnutes<-removal(catch,method="Schnute")
Error in if (LCIfail) { : missing value where TRUE/FALSE needed
@droglenc droglenc self-assigned this Dec 2, 2016
@droglenc
Copy link
Owner Author

@droglenc droglenc commented Dec 3, 2016

This error only occurs for three passes. This makes sense to send an error here because the Schnute method is attempting to estimate probabilities of capture for the first pass and other than the first pass. If the catch on the third pass is zero then this implies that the probability of capture for other than the first pass was 1 (i.e., it appears that all fish were captured on the second pass). Thus, the optimization routine ultimately gets to 1 for this probability which then causes an error in the likelihood function (because of the logs).

I modified removal() to throw an error message when this situation occurs.

> catch <- c(4,2,0)
> schnutes<-removal(catch,method="Schnute")
 Error: The Schnute method will fail when the catch in the last of three samples is 0. 

There might be a better way to handle this. What would be the estimate of N and the CIs in such a situation? Can the probability of capture for the second sample be fixed at 1?

@droglenc droglenc closed this Dec 3, 2016
droglenc added a commit that referenced this issue Dec 3, 2016
Related to Issue #26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.