Estimator unbiased with no spatial recaps

19 views
Skip to first unread message

Greg Distiller

unread,
Aug 6, 2025, 6:01:26 AMAug 6
to secr
Hi Murray
I am curious as to how the SCR estimator can perform fairly well when there are no spatial recaptures. I have run simulations (count model with 1 occasion) using a grid with 1600 m spacing, and when I use a sigma of 200 m the data produce no spatial recaptures as one would expect. Despite this, the means for both D and sigma are pretty much unbiased. The standard errors are quite high though there seem to be only a small number that go completely wonky. Please see boxplots below showing 100 estimates and standard errors for D and sigma:
image.png
image.png
Here are the mean/median ses and the CVs (relative to the true D and Sigma):

> summary(D1.se) ; summary(Sigma1.se)

    Min.  1st Qu.   Median     Mean  3rd Qu.     Max.

  0.0312   0.0701   0.1084   8.3174   0.1980 457.0619

   Min. 1st Qu.  Median    Mean 3rd Qu.    Max.

  37.58   83.89  155.20  228.92  249.14 2330.00

 

> sd(D1.se)/D1 ; sd(Sigma1.se)/sigma1

[1] 1133.87

[1] 1.650371

 

I suspect these CVs are too high, especially for D! If I exclude the few really wonky estimates it is a lot better though still over 18 for D:

> sd(D1.se[D1.se < 300])/D1 ; sd(Sigma1.se[Sigma1.se < 1500])/sigma1

[1] 18.36423

[1] 0.6959725


In summary, the lack of spatial recaps is causing instability but I am a bit surprised about the lack of bias and was wondering how come the estimator can still perform fairly well, especially for sigma when there are no spatial recaps?


Many thanks


Greg 

Murray Efford

unread,
Aug 6, 2025, 8:11:24 PMAug 6
to secr
Hi Greg

I get these results:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
library(secrdesign)
grid <- make.grid(8,8, spacing = 1600, detector = 'count')
scen <- make.scenarios(D = 0.1, sigma = c(100,200), lambda0 = c(0.5,2), detectfn = 'HHN', noccasions = 1)
scen
#   scenario trapsindex noccasions nrepeats   D lambda0 sigma detectfn recapfactor popindex detindex fitindex
# 1        1          1          1        1 0.1     0.5   100       14           1        1        1        1
# 2        2          1          1        1 0.1     2.0   100       14           1        1        1        1
# 3        3          1          1        1 0.1     0.5   200       14           1        1        1        1
# 4        4          1          1        1 0.1     2.0   200       14           1        1        1        1

sims <- run.scenarios(100, scen, trapset = grid, fit = TRUE, fit.args = list(detectfn = 'HHN'))
# There were 50 or more warnings (use warnings() to see the first 50)
# Warning messages:
# 1: In (function (capthist, model = list(D ~ 1, g0 ~ 1, sigma ~  ... :
#     possible maximization error: nlm returned code 3. See ?nlm
# 2: In (function (capthist, model = list(D ~ 1, g0 ~ 1, sigma ~  ... :
#     at least one variance calculation failed
# etc.
                                                                                   
estimateSummary(sims, 'D')
estimateSummary(sims, 'sigma')

estimateSummary(sims, 'D')
#   scenario true.D nvalid          EST        seEST            RB         seRB       RSE         RMSE        rRMSE       COV
# 1        1    0.1     94 5.090688e+06 5.084053e+06  5.090688e+07 5.084053e+07 3.1034566 4.929241e+07 4.929241e+08 0.6595745
# 2        2    0.1    100 3.720723e-02 1.316274e-03 -6.279277e-01 1.316274e-02 0.2611739 6.414404e-02 6.414404e-01 0.1300000
# 3        3    0.1     99 7.517546e-02 3.661660e-03 -2.482454e-01 3.661660e-02 1.0877889 4.393425e-02 4.393425e-01 0.9090909
# 4        4    0.1     99 5.602698e-02 9.635638e-04 -4.397302e-01 9.635638e-03 0.2605152 4.499572e-02 4.499572e-01 0.3131313

estimateSummary(sims, 'sigma')
#   scenario true.sigma nvalid      EST     seEST        RB        seRB       RSE      RMSE     rRMSE       COV
# 1        1        100     99 291.9102 39.882309 1.9191021 0.398823091 0.6355452 438.98541 4.3898541 0.8181818
# 2        2        100    100 239.1627  7.814143 1.3916268 0.078141431 0.3628580 159.40914 1.5940914 0.2900000
# 3        3        200     46 283.8436  3.626230 0.4192179 0.018131150 1.3382908  87.30106 0.4365053 1.0000000
# 4        4        200     98 274.0997  1.948284 0.3704986 0.009741422 0.1622791  76.54386 0.3827193 0.3571429
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

So I think you're flattering the estimator to say it performs 'fairly well': the estimate of sigma is >200 even for sigma=100.

The mystery for me is why the apparent precision (RSE) is so small - I really don't know.
One consideration is that the default* behaviour of run.scenarios is to start likelihood maximisation from the true parameter values, rather than the usual improvised starting values in secr.fit(). You can override that by setting fit.args = list(start = NULL) in run.scenarios(). But then it fails immediately because there are no spatial recaptures.

Another thought is that the default mask resolution will be way too coarse in the example:
spacing(make.mask(grid, buffer = 4 * 200, nx = 32)) [1] 400

Murray

* I can't find that in the documentation!

Greg Distiller

unread,
Aug 15, 2025, 5:49:46 PMAug 15
to Murray Efford, secr
Hi Murray
Thanks for this, I did wonder if the starting values were playing a role because without spatial recaps I thought there was very little info to inform the estimation of sigma (other than that it is not large enough to get recaps).

Given that I am trying to assess different designs, and typically one would not know the true parameter values, it seems to me that I should override that default behaviour even if it results in models failing. I am hoping to show that if one has two focal species with very different detection parameters that a design with regular spacing will not work well for both, but that hopefully the genetic algorithms that can produce clustered designs will do better.

Many thanks as always!

BTW I reposted this response after I realised that I had not posted to the group.

--
You received this message because you are subscribed to the Google Groups "secr" group.
To unsubscribe from this group and stop receiving emails from it, send an email to secrgroup+...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/secrgroup/39799bce-ac1e-4970-a9b7-09b2070407b7n%40googlegroups.com.

Greg Distiller

unread,
Aug 15, 2025, 5:49:52 PMAug 15
to Murray Efford, secr
A quick follow up. I reran the sims after specifying start = NULL as part of fit.args. Now I am getting a handful of reps that fail but surprisingly the results are again pretty good considering, certainly in terms of bias. The precision is not great but I am still struggling to understand how the estimator can perform so well with no spatial recaptures. Is it possible that I have not managed to override the default behaviour you mentioned?

For the strata with a sigma of 200 m (and L0 = 2 ; D = 0.05), using a grid with 1600 m spacing, I get no spatial recaps but a relative bias for D of 0.16 and sigma is unbiased. The relative SE for these is 0.51 and 0.78. Here are the estimates and ses from the set of reps:

             D        D.se        L0     L0.se    Sigma  Sigma.se
2   0.05560512  4.56286832 1.4913275 0.3395801 207.6991 583.06413
3   0.06127228  1.07830190 0.9764678 0.2780056 225.1168 400.11061
4   0.04673214  0.17052301 1.8677736 0.4006288 206.2639 199.53236
5   0.05572959  0.43395770 1.9969113 0.3933666 194.7428 258.53992
6   0.18318597  0.10781101 1.9922359 0.8864832 114.2678  52.60549
7   0.04093261 13.16352966 2.1566886 0.3937382 232.4471 946.47684
8   0.03407096  0.33494372 2.0999271 0.4160809 236.1006 342.90080
9   0.08060736  0.04811855 2.3295493 0.4577737 140.5463  39.95076
10  0.03154864  0.15663095 1.9435768 0.4252150 235.6426 261.76516
11  0.03206477  0.04717806 2.4363932 0.4274060 247.8578 141.75621
12  0.03454505  1.41849201 2.0479880 0.4161297 232.7168 536.60015
13  0.03212184  0.06553326 2.1709853 0.4148859 246.0762 173.42682
14  0.03322382  0.09251087 1.9299490 0.4165062 238.1010 201.03504
15  0.09712160  0.06095262 2.1734080 0.5137992 128.1630  43.91375
17  0.03565811  0.28017640 2.2427363 0.4638313 213.4772 285.49326
18  0.17468625  0.18123294 1.3818141 0.9160039 116.5494  88.06917
19  0.11820567  0.10411455 1.9505133 0.4378178 132.7022  59.12559
20  0.03771886  0.12426174 1.6847244 0.3766012 239.6901 220.73287
21  0.04461903  0.12053552 2.1680564 0.4745217 186.1621 153.17906
22  0.05211273  0.11195826 2.1702321 0.4070431 201.5536 147.14173
23  0.04904799  0.55331128 1.6777957 0.3477965 223.2589 342.03350
24  0.09289089  0.09606497 1.3789246 0.3099926 174.0602  76.04025
25  0.05795504  0.15456475 1.9846571 0.4017374 187.2252 153.33865
26  0.04595238  0.49215510 1.8257019 0.3599899 227.1695 341.45878
27  0.06989475  1.45391632 1.1515915 0.2730984 219.0900 410.89359
28  0.07174321  0.45772487 1.1497945 0.2860958 207.5466 256.28956
29  0.03895831  0.49510469 1.5232164 0.3541216 236.5999 376.49474
30  0.02115704  0.04958156 2.2514868 0.5018267 249.1956 190.56204
31  0.03325994  0.03289435 2.0885089 0.4012154 255.4355 108.78098
32  0.09431233  0.07326659 1.9687432 0.4084784 140.4911  51.62574
33  0.05348471  0.10361770 1.7725349 0.3903295 194.6966 132.81436
34  0.04374288  0.11183865 1.7991999 0.4403380 194.2690 156.62246
35  0.05208193  0.04190020 2.3131031 0.4675552 190.8269  69.72137
36  0.03943730  0.04874121 2.1226469 0.5061171 191.8185  97.51885
37  0.03766856  0.51046976 2.1521199 0.4778470 206.7785 341.41852
38  0.04175080  0.39917489 1.4996276 0.4050599 203.4190 292.14823
39  0.07739213  0.08932667 1.8145102 0.3699813 169.4765  80.43034
40  0.06267110  0.07578935 1.8633845 0.4094910 172.5847  84.72686
41  0.03557525  0.11172711 1.9236734 0.3930751 237.7787 213.23025
42  0.06433490  0.10100510 2.2355750 0.3883189 191.4748 114.36370
43  0.08845698  0.13741045 1.5548607 0.3273469 171.9969 101.21509
44  0.04997628  0.17650952 1.8118902 0.3487015 228.4889 218.49846
45  0.07414361  0.04596908 2.0898091 0.4358119 151.6241  42.75885
46  0.13388012  0.08128983 2.4948517 2.5497681 105.0235  72.06007
47  0.05029117  0.07156841 1.8999967 0.4054765 202.3519 114.01708
48  0.09422307  0.13331674 1.8300031 0.3531602 158.6578  87.96157
49  0.02669178  0.04713644 2.2665265 0.4466368 250.1498 161.38518
51  0.07778134  0.06430571 1.9731419 0.4198750 149.5031  55.19761
52  0.04712322  0.04259311 2.4801694 0.4625837 203.3318  81.53365
53  0.10905166  0.07400078 1.8860755 0.3334062 158.3041  48.62672
54  0.02969150  0.06325310 2.3248040 0.4437276 244.9087 177.12842
55  0.03564054  0.90103216 1.7774677 0.3900269 234.3908 466.62710
56  0.06244630  0.04265537 2.4472665 0.4595035 170.1343  52.19577
57  0.04811307  0.15489931 1.7890637 0.3381014 238.1699 216.78082
58  0.04204525  0.10228975 1.8689654 0.4603679 191.7551 150.16081
59  0.04762756  0.12599811 1.8686538 0.3316323 238.6798 195.76788
60  0.04998473  0.11186345 2.1113350 0.3638326 226.4074 169.79138
61  0.03655896  0.10540664 1.6985819 0.3800837 240.8698 207.12001
62  0.05150472  0.12851501 2.3679633 0.4438915 190.5038 150.57964
63  0.03061851  0.07540056 2.4341216 0.4949268 230.3418 182.70203
64  0.09112173  0.05624791 2.0919942 0.4108053 142.4741  41.66157
65  0.07479905  0.07264975 2.5821995 0.4840789 142.7150  61.37098
66  0.07171752  0.07295216 2.1300367 0.4298543 155.8326  67.33798
67  0.07905156  0.10846568 2.0385569 0.3735950 171.5286  92.19627
68  0.04983123  0.20127344 1.6879145 0.3239557 235.8893 239.06841
69  0.03149479  0.14746712 2.2342136 0.4477392 233.2364 252.64151
70  0.05035344  0.05155676 2.7314343 0.4705664 193.6997  84.83283
71  0.04440937  0.07249073 2.3717595 0.4561816 205.0372 126.91967
72  0.06767709  0.10096773 1.8010743 0.3938629 170.8253  97.76160
73  0.08626648  0.05458191 2.1213768 0.3844165 162.1681  46.52725
74  0.03837605  0.19530403 1.7444193 0.3618896 240.2341 269.60505
75  0.03772311  0.08362825 2.0176284 0.3709034 244.1756 181.32101
76  0.03917235  0.08364479 2.1458428 0.4092362 234.8862 171.43452
77  0.05203407  0.07157410 1.9594029 0.4173415 192.3984 105.09965
78  0.02647618  0.03547886 2.4212428 0.5076553 241.9381 130.24702
80  0.07739897  0.04094647 2.4806554 0.4410518 155.6600  37.59420
81  0.05828426  0.05054672 2.4618831 0.4768367 167.8722  63.09224
82  0.13344923  0.12229381 1.9831721 0.4680298 130.3657  62.20091
83  0.04465864  0.07628046 2.0142033 0.4182985 209.0276 132.82589
84  0.05178508  0.10800361 2.0413858 0.4412138 181.0333 127.89706
85  0.03046048  0.06566154 2.0469336 0.4151613 247.8800 180.37460
86  0.03491669  0.14222723 1.5864273 0.3623193 244.2778 247.86169
87  0.04547338  0.14367512 1.9001558 0.4156717 202.8924 182.75842
88  0.05809500  0.21362485 1.6045931 0.3372794 211.2383 205.57080
89  0.05356330  0.04561554 2.2640996 0.4746691 173.7547  64.72114
90  0.04257086  0.16110384 1.8094994 0.3556921 236.7352 232.65748
91  0.09640978  0.11310131 1.4756021 0.3245743 163.2155  78.81701
92  0.04076902  0.31810837 1.6038227 0.3612849 232.7039 310.92281
93  0.05244336  0.03497013 3.2987862 0.5707410 167.8696  50.34014
94  0.04077207  0.28439742 1.5412178 0.3448816 237.8643 303.54677
95  0.06112342  0.27146905 1.8752029 0.3659076 196.5306 207.56889
96  0.05287699  0.03122735 2.7433064 0.5235288 171.9880  46.27833
97  0.02968827  0.04446794 1.8808213 0.4209757 249.8597 144.77945
98  0.05907389  0.11602351 1.9870360 0.3871378 193.4777 133.32672
100 0.03351835  0.07671517 2.2618063 0.4855410 213.8455 162.05005

Thanks!

Reply all
Reply to author
Forward
0 new messages