Seeking advise for interpreting abundance and detection probabilities; pcount, predict

279 views
Skip to first unread message

markus

unread,
Jul 28, 2019, 11:59:34 AM7/28/19
to unmarked
Dear all

I am a master student and fairly new to R and first time user of the unmarked package.

For my thesis I would like to obtain abundance and detection estimates using the pcount() function. 

I have 36 plots (in 4 different habitat types, 9 plots each) with 9 repeated visits each plot. Further I have a bunch of variables affecting detection and some variables affecting abundance.

# UMF model
>UMF_guentheri<-unmarkedFramePCount(cov_N_guentheri[,2:10],siteCovs = z_sitecovs_guentheri[,2:7],obsCovs = list(cc= z_cc[,2:10], day=z_day[,2:10],effort= z_effort[,2:10], intervall= cov_intervall[,2:10], wind= z_wind[,2:10], rain= cov_rain[,2:10], sun= cov_sunout[,2:10], temp= z_temp[,2:10])) see UMF plot in attachment

>summary(UMF_guentheri)

36 sites
Maximum number of observations per site: 9 
Mean number of observations per site: 9 
Sites with at least one detection: 36 

Tabulation of y observations:
0   1   2   3   4 
60 118  75  44  27 
...

>fm.guentheri <-  pcount(~cc+day+effort+intervall+sun+temp+wind+rain~trees+site,UMF_guentheri,K=106,mixture = "P")

Call:
pcount(formula = ~cc + day + effort + intervall + sun + temp + 
    wind + rain ~ trees + site, data = UMF_guentheri, K = 106, 
    mixture = "P")

Abundance (log-scale):
             Estimate     SE      z  P(>|z|)
(Intercept)    1.6151 0.2043  7.907 2.64e-15
trees          0.0201 0.0804  0.250 8.02e-01
siteNo Palm    0.3348 0.2420  1.384 1.66e-01
sitePalm      -0.1328 0.2449 -0.542 5.88e-01
sitePandanus   0.0303 0.2375  0.128 8.98e-01

Detection (logit-scale):
                 Estimate       SE       z P(>|z|)
(Intercept)       -1.0341   0.7375 -1.4021 0.16087
cc                 0.0531   0.0687  0.7727 0.43970
day                0.2866   0.1283  2.2334 0.02552
effort             0.2221   0.0713  3.1145 0.00184
intervallmorning   0.1077   0.2047  0.5262 0.59877
intervallnight    -0.1846   0.7125 -0.2590 0.79562
sunyes             0.2101   0.6966  0.3017 0.76291
temp              -0.0632   0.1076 -0.5872 0.55708
wind               0.0641   0.0674  0.9512 0.34151
rainmiddle        -0.9506   1.1152 -0.8524 0.39401
rainno             0.0348   0.2075  0.1678 0.86670
rainstrong       -13.1160 258.6321 -0.0507 0.95955

AIC: 943.0453 
Number of sites: 36
optim convergence code: 0
optim iterations: 82 
Bootstrap iterations: 0 


>gof.guentheri <- Nmix.gof.test(fm.guentheri,print.table = TRUE,nsim = 1000,report = TRUE,plot.seasons = TRUE) 

Chi-square goodness-of-fit for N-mixture model of 'unmarkedFitPCount' class

Observed chi-square statistic = 260.12 
Number of bootstrap samples = 1000
P-value = 0.902

Quantiles of bootstrapped statistics:
  0%  25%  50%  75% 100% 
 212  277  295  316  426 

Estimate of c-hat = 0.88 

I continued using the dredge function for automated model selection by AICc. 

The best models that I obtained are shown below.

> subset(dredge.fm.guentheri, delta < 2)
Global model call: pcount(formula = ~cc + day + effort + intervall + sun + temp + 
    wind + rain ~ trees + site, data = UMF_guentheri, K = 106, 
    mixture = "P")
---
Model selection table 
               p(Int)   lam(Int) p(day) p(eff)   p(int) p(ran) p(sun)  p(tmp) df     logLik   AICc  delta weight
1   54  -1.0220    1.660  0.2245 0.2399             +      +                       8 -458.500 938.3  0.00  0.133
2   38  -1.2100    1.697  0.2147 0.1863                     +                       5 -463.282 938.6  0.23  0.119
3   52  -1.1070    1.715              0.2308             +      +                       7 -460.333 938.7  0.33  0.113
4   36  -1.2970    1.761              0.1773                     +                       4 -464.992 939.3  0.94  0.083
5   116 -1.2380    1.693             0.2324             +      +       -0.10990  8 -458.983 939.3  0.97  0.082
6   14  -0.8448    1.684  0.2161 0.1789      +                                      6 -462.235 939.4  1.03  0.079
7   30  -0.7253    1.647  0.2247 0.2348      +     +                               9 -457.365 939.7  1.32  0.069
8   118 -1.1600   1.651  0.2087 0.2395             +      +       -0.10190  9 -457.388 939.7  1.37  0.067
9   102 -1.2580   1.688  0.2038 0.1824                     +       -0.08505  6 -462.404 939.7  1.37  0.067
10   28  -0.8112   1.697             0.2266      +     +                               8 -459.193 939.7  1.38  0.067
11   100 -1.3380  1.744             0.1742                    +        -0.09131  5 -463.941 939.9  1.55  0.061
12   12  -0.9370   1.746             0.1704      +                                      5 -463.953 939.9  1.57  0.061
Models ranked by AICc(x) 

I used these top ranked models for predictions. however, they basically do not differ from each other, so I just continue with the best model

>  predict(g1, type="state", appendData=FALSE)
   Predicted       SE          lower    upper
1   5.260214 0.825904 3.866844 7.155669
2   5.260214 0.825904 3.866844 7.155669
3   5.260214 0.825904 3.866844 7.155669
...
36  5.260214 0.825904 3.866844 7.155669

Looks good so far. There is no site covs in the model so I expect the same predictions of abundances for all sites.

> predict(g1, newdata=obs_guentheri2[,c(3:5,9)], type="det", appendData=TRUE)
    Predicted           SE               lower     upper           effort sun day   rain
1   0.9489066 0.0588755050 0.6321750 0.9950418     16  no   1     no
2   0.9489066 0.0588755050 0.6321750 0.9950418     16  no   1     no
3   0.9724097 0.0337771327 0.7492787 0.9975999     17 yes   1     no
4   0.9561620 0.0470254442 0.7075595 0.9949399     15 yes   1     no
5   0.9774980 0.0277364178 0.7858158 0.9980596     16 yes   3     no
6   0.9715695 0.0330283376 0.7663633 0.9971991     15 yes   3     no
7   0.9998427 0.0004873043 0.9361761 0.9999996     19 yes  22     no
...

Here I got suspicious...so I estimated mean detection probabilities for each of the plots

> pred.obs.guentheri.table
   GPS     site        Predicted          SE             lower      upper
1    1  No Palm    0.9616917 0.045272184 0.6058606 0.9958065
2  110      Mix       0.9628263 0.046072810 0.6312597 0.9966766
3  113 Pandanus 0.9487735 0.057333874 0.5993777 0.9943026
4  119     Palm     0.9992081 0.002568591 0.6361635 0.9999984
...

Which resulted that I have an almost 100% detection rate in all of my 36 plots. 
Any advice how to deal with this? Earlier studies on this species estimated detection rates between 20 and 40%.
(I also tried to use ZIP instead of P, as there is quite some 0 in my data set, but I ended up with the same results)

What I found in an old post here, i think it was by Jim Baldwin, is that some data "barely obtain a unique maximum likelihood estimate". I am not sure if I used the provided code correctly but I run the first two bits of it

> mNull <- pcount(~1~1,UMF_guentheri, K=10000, control=list(reltol=0.0000000001))  #or K=100
> backTransform(mNull, type="state")
Backtransformed linear combination(s) of Abundance estimate(s)

 Estimate   SE LinComb (Intercept)
     6.69 1.46     1.9           1

Transformation: exp 
> backTransform(mNull, type="det")
Backtransformed linear combination(s) of Detection estimate(s)

 Estimate     SE LinComb (Intercept)
    0.234 0.0498   -1.18           1

Transformation: logistic 
> # Find correlation of the estimators of lambda and p
> covmat = solve(mNull@opt$hessian)
> covmat[1,2]/(covmat[1,1]*covmat[2,2])^0.5
[1] -0.939637

Do you have any advice how to proceed in such a case? Does this mean that the data I obtained in the field is not "enough" to successfully use pcount to estimate abundances?
Is there any other approach that I could follow to estimate abundances, that would work with my data?
My goal is to estimate abundances in the 4 different habitat types and (together with the specific areas of the different habitat types) get an estimate for overall population size.

Thanks a lot!

Markus
UMF_guentheri_28072019.jpeg

Timothy Lyons

unread,
Jul 28, 2019, 1:43:46 PM7/28/19
to unmarked
What is the rain covariate? The beta estimate for it seems like it's over parameterized, or there is some kind of complete separation (whenever rainstrong was true there was virtually no detection)

markus

unread,
Jul 28, 2019, 2:25:17 PM7/28/19
to unmarked
Hi Tim

Thanks. I used 4 categories for rain: no, low, middle and strong. It is true that rain has a negative impact on detection, as my study species, a gecko, usually hides during rain. I therefore tried to avoid rainy days, however, the weather sometimes changed quite rapidly and thus I could not avoid having some surveys with rain. Though, mostly categorised as low, there was one survey with middle and strong rain, respectively.

>cov_rain
GPS_site        rain.1 rain.2 rain.3 rain.4 rain.5 rain.6 rain.7 rain.8 rain.9
110_Mix              no     no    low     no     no     no     no     no     no
125_Mix              no     no     no     no     no     no     no     no     no
136_Mix              no     no     no    low    low     no     no     no     no
84_Mix                no     no    low     no     no     no     no     no     no
59_Mix                no     no     no     no    low     no     no     no     no
54_Mix                no    low     no     no     no     no     no     no     no
412_Mix              no     no    low     no     no     no     no     no     no
85_Mix                no     no middle    low     no     no     no     no     no
53_Mix                no     no     no     no     no     no     no     no     no
6_No Palm          no     no     no     no     no     no     no     no     no
26_No Palm        no     no     no     no     no     no     no     no     no
3_No Palm          no     no     no     no     no     no     no     no     no
1_No Palm          no     no     no     no    low     no     no     no     no
66_No Palm        no     no     no     no     no    low     no     no     no
57_No Palm        no     no     no     no     no     no     no    low     no
86_No Palm        no     no     no     no     no     no     no     no     no
14_No Palm        no     no     no     no     no    low     no     no     no
67_No Palm        no     no     no     no     no     no     no     no     no
176_Palm           no     no     no     no     no     no     no    low     no
172_Palm           no     no     no    low    low     no     no     no     no
76_Palm             no     no     no     no     no     no    low     no     no
130_Palm           no     no     no     no    low     no     no     no     no
124_Palm           no     no    low     no     no strong     no     no     no
138_Palm           no     no     no     no     no     no     no     no     no
119_Palm           no     no     no    low     no     no     no     no     no
420_Palm           no     no    low     no     no     no     no     no     no
439_Palm           no     no    low    low     no     no     no     no     no
65_Pandanus     no     no     no     no    low     no     no     no     no
149_Pandanus   no     no     no     no    low     no     no     no     no
113_Pandanus   no     no     no    low     no     no     no     no     no
64_Pandanus     no     no    low     no     no    low    low     no     no
139_Pandanus   no     no     no     no     no     no     no     no     no
16_Pandanus     no    low     no    low     no     no     no     no     no
83_Pandanus     no     no     no     no     no     no     no     no     no
51_Pandanus     no     no     no     no     no     no     no     no     no
438_Pandanus   no     no     no     no     no     no     no     no     no

Ken Kellner

unread,
Jul 28, 2019, 8:37:12 PM7/28/19
to unmarked
Hi Markus,

I agree with Tim that the rain covariate is a bit worrying. Have you tried fitting a model with rain converted to a binary covariate (no/yes or 0/1)? That would be my next move, and then check to see if the predicted detection probabilities are still very high, just to rule out separation as an issue in the model fit.

Ken

markus

unread,
Jul 29, 2019, 3:19:56 AM7/29/19
to unmarked
Thank you, Ken. I just tried and the beta estimate is not over parameterised anymore, however predicted detection probabilities did not change much.

> summary(fm.guentheri)

Call:
pcount(formula = ~cc + day + effort + intervall + sun + temp + 
    wind + rain ~ trees + site, data = UMF_guentheri, K = 106, 
    mixture = "P")

Abundance (log-scale):
             Estimate    SE      z  P(>|z|)
(Intercept)    1.6443 0.214  7.685 1.54e-14
trees          0.0179 0.079  0.226 8.21e-01
siteNo Palm    0.3803 0.240  1.586 1.13e-01
sitePalm      -0.1521 0.244 -0.624 5.33e-01
sitePandanus   0.0566 0.235  0.241 8.09e-01

Detection (logit-scale):
                 Estimate     SE      z P(>|z|)
(Intercept)       -0.9954 0.7101 -1.402  0.1610
cc                 0.0421 0.0677  0.621  0.5344
day                0.2989 0.1298  2.303  0.0213
effort             0.1681 0.0660  2.548  0.0108
intervallmorning   0.1041 0.2026  0.514  0.6072
intervallnight    -0.2675 0.7044 -0.380  0.7041
sunyes             0.1519 0.6893  0.220  0.8256
temp              -0.0546 0.1065 -0.513  0.6077
wind               0.0637 0.0667  0.955  0.3398
rainyes           -0.1107 0.2037 -0.543  0.5870

AIC: 947.9814 
Number of sites: 36
optim convergence code: 0
optim iterations: 76 
Bootstrap iterations: 0 


> pred.obs.guentheri.table 
   GPS     site         Predicted          SE     lower             upper
1    1  No Palm    0.9612655 0.045916478 0.6012823 0.9958009
2  110      Mix      0.9624382 0.046686908 0.6267043 0.9966707
3  113 Pandanus 0.9482692 0.058084726 0.5947165 0.9942970
4  119     Palm     0.9991998 0.002598323 0.6319334 0.9999984
...


Reply all
Reply to author
Forward
0 new messages