The data I was given was from a camera survey, which I had finish analyzing. Take 2 species as an example:
- Code: Select all
> speciesA
p Psi se_p se_Psi
A1 0.2090038 0.7917271 0.05914128 1.644753e-01
A2 0.3194914 0.9194610 0.05623518 8.182215e-02
A3 0.4120172 0.9637856 0.05617113 3.495985e-02
A4 0.4908518 0.9841868 0.05623978 1.486302e-02
A5 0.5563613 0.9940506 0.05559811 5.575551e-03
A6 0.6109906 0.9985120 0.05445608 1.397691e-03
A7 0.6579861 1.0000000 0.05297711 7.854624e-06
A8 0.6944445 1.0000000 0.05146593 7.870106e-06
A9 0.7250000 1.0000000 0.04992180 0.000000e+00
- Code: Select all
> speciesB
p Psi se_p se_Psi
B1 0.09042135 0.5742533 0.07517990 0.07321705
B2 0.10374470 0.5445824 0.08030029 0.07641597
B3 0.11897139 0.5106727 0.08615217 0.08007187
B4 0.13654064 0.4715462 0.09290434 0.08429022
B5 0.15703810 0.4258987 0.10078187 0.08921163
B6 0.18126237 0.3719515 0.11009167 0.09502785
B7 0.20239517 0.3320953 0.11727589 0.09854442
B8 0.24586043 0.2280925 0.13491782 0.11053774
B9 0.29027160 0.1291894 0.15198580 0.12120080
From A1-A9 means 1-9 sample units per site, and same with B1-B9.
I created a function to calculate "s (number of site needed)" given p, Psi and se of PSI of species A & B.
- Code: Select all
fun2<-function(X){ ###X==summarized output of each species
results<-matrix(nrow=9, ncol=1)
for (i in 1:9){
pstar<-(1-(1-X$p[i])^10)
psi<-X$Psi[i]
p<-X$p[i]
SE<-ifelse(X$se_Psi[i]==0, 0.1466796E-004, X$se_Psi[i])
####to avoid "Inf" when calculating s with SE=0 (in speciesA's case)"
s<-(psi/(SE^2))*((1-psi)+((1-pstar)/(pstar-10*p*((1-p)^(10-1)))))
### formula given by MacKenzie and Royle (2005)
results[i,]<-s
}
return(results)
}
> x<-c(1:9) ###sampling units per grid
> data.frame(sites_surveyed=x*8, species_A=fun2(speciesA), Species_B=fun2(speciesB))
sites_surveyed species_A Species_B
1 8 10.40762 228.482071
2 16 14.38984 154.490380
3 24 32.61289 105.427771
4 32 75.73178 72.792145
5 40 199.72436 50.864010
6 48 801.17672 35.735748
7 56 355122.96227 28.484875
8 64 114554.61097 15.897574
9 72 11497.85695 7.999998
> ####x*8 because I had 8 grids total#######
Given the parameter estimates (p, Psi, se of Psi) from my empirical analyses, it looks like we didn't need thousands of sampling units to achieve high p, high Psi and low se of Psi in SpeciesA. For species B with low p, low Psi and higher se of Psi, it was the other way around.
What I'm ultimately after is, what are the optimal sampling efforts for species A and B respectively given the field study we have conducted? Especially for Species B, can the method provided by MacKenzie and Royle (2005) precisely give us how many sampling units are needed if we need higher parameter estimates?
Thanks.