-
Notifications
You must be signed in to change notification settings - Fork 4
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
Uniform detection function without adjustments giving error #79
Comments
@LHMarshall see related issue about knock-on consequences of uniform detection function and Hessian for |
@lenthomas how should the expected cluster size be calculated in the case of a uniform detection function with no adjustments? I need an alternative for this situation than the current code based on all sorts that are NULL in this situation. I guess there is no variability from the N_hat and Nc_hat values so is it just the variability observed in the E[cluster size] values? The standard deviation of the cluster sizes observed in each stratum divided by n-1?
|
It no longer crashes... but it omits the se of the expected cluster size. I notice that there is still variability in the abundance estimates due to the encounter rate variability which will need to be incorporated into the se of the expected cluster size.
|
…late the se of expected cluster size Reference #79
Hi @LHMarshall I'm afraid I'm not familiar with the code here at all, but I do think I know what should happen from the statistics perspective. When using a uniform+no adj then the expected cluster size is the mean cluster size, so the standard error of mean cluster size is the standard deviation of cluster size divided by sqrt (n). (Note, not n-1.) This formula can be used at both the stratum level and, presumably, at the global level. I say "presumably" because I assume that the "Total" expected cluster size is simply the mean cluster size taken over all observed individuals. It may not be that simple however -- for example it might be an area-weighted mean if the samples in each stratum are taken to be representative of the groups in that stratum and the strata differ in area. So it's important to know how the "Total" E(S) is arrived at in order to know exactly how to calculate the "Total" se(E(S)). Hope that makes sense. |
@lenthomas Ok I've looked into how the E(S) values are calculated. The total E(S) value looks to be a weighted mean based on the estimated abundance / density which makes sense. What does that mean for calculating the se of the total E(S) as there will be variability associated with the values which the weighted mean is based on due to encounter rate? See exploratory code below
Simulated data used different areas and different densities in each stratum - also different mean cluster sizes |
Hmm... that means E(s) is estimated likely using hat(N) / hat(N)_s, i.e., ratio of estimated total population size to estimated cluster size (see formula 3.36 in Marques and Buckland 2004 - chapter 3 of the Advanced Distance Sampling book (although my notation is different)). Equation 3.37 has the variance calculation and 3.38 has the relevant covariate. Does that help? |
@lenthomas and therein lies the problem... with the uniform model and no adjustments we now have no hessian matrix as required in 3.38. Is the covariance just 0 then if that is entirely associated with the detection function estimation? I assumed you meant covariance rather than covariates above? With the uniform and no adjustments you cannot have covariates right? |
That's right no covariates with uniform. |
@lenthomas ok so I just made the covariance 0 in this case (commit should be reference above).... my output matches my initial understanding of formula 3.37 (but see below as I realised that the values I can get at easily are not the ones in the formula in the book) and also these estimates bear no resemblance to the group sd(size)/sqrt(n)! See image below... So to check those values (and they match) I calculated I couldn't easily get at the relevant values for cluster and individual estimates for the covered areas by stratum which are the values that 3.37 is based on. But I think the above is ok because of the rules for multiplication by a constant which is all that has happened to these values right?
|
The text was updated successfully, but these errors were encountered: