Models Failing to Converge

131 views
Skip to first unread message

Emma Wilson

unread,
Jun 26, 2025, 4:18:00 PMJun 26
to unmarked
Hello,

I am using "unmarked" to build occupancy models that includes data for 34 sites, some of which were surveyed a different number of times (1-4, 1-5, and 1-10). 0s represent non-detection, while NAs represent no survey for that particular survey occasion. Prior to running the models, all continuous variables were standardized and checked for collinearity.

My models are failing to converge unless specific covariates are removed (that is, average depth in m, the presence of Trachemys species, and the presence of Chrysemys species). Currently, I am using intercept-only for detection.

I receive the following errors when all site-level covariates are run:

Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
Warning: Hessian is singular. Try providing starting values or using fewer covariates.
Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'x' in selecting a method for function 'diag': Lapack routine dgesv: system is exactly singular: U[3,3] = 0

Is there anything about the code structure or data that may be preventing model convergence when including variables for avg_depth_m, Trachemys_present, and Chrysemys_present?

Please let me know if you have any thoughts as to how to best approach this issue. Thank you for your time and assistance!

All the best,
Emma

This is the script used:

> # Data Format:
> dput(obs_covs_list) # Observation covariates
list(max_air_temp_C = structure(list(max_air_temp_C.1 = c(-0.459496711703865,
-0.580604373234465, 0.424589209185752, 0.424589209185752, -0.738044331480295,
-2.04600706554707, 1.5630012201616, 0.642582998196882, -0.277835221587903,
1.67199811466717, 1.5630012201616, -1.88856710730124, 0.24292771906979,
0.24292771906979, 0.860576787208012, 0.30348154983509, -0.435275179833732,
-1.04081348312686, 1.12701364213934, 0.824244490492783, 0.872687554233047,
-0.302056753458035, 0.800022958622649, -1.25880727213799, -1.73112714905541,
-1.19825344137269, -0.338389052353203, -0.641158203999765, -0.665379735869898,
1.23601053664491, 0.279260017964958, 1.01801674763378, 0.0733769937989247,
-0.568493606209429), max_air_temp_C.2 = c(-0.303742800714979,
-1.41065499263084, 0.979804314811402, 0.979804314811402, -2.48224020109637,
-0.657012650055633, 0.43812388141666, 0.67363711360389, -1.04560948284662,
1.73344665950623, 0.803169391200885, -0.715890958632345, -0.551031695465399,
-0.551031695465399, -0.56280735590897, -0.680563973062394, -1.36355234661732,
-0.84542323622934, -0.162434862674413, 0.968028654367831, 1.00335563781816,
0.508777850436943, 1.38017681016558, 0.461675204423421, -0.185986185681174,
0.143732340652719, -0.386172432298452, 1.02690696294454, 0.838496376770836,
1.40372813317234, 0.449899541860231, 0.744291082624172, -1.45775764076398,
-1.17514176044361), max_air_temp_C.3 = c(-1.84373413837006, 0.111392955936023,
1.23978059325572, 1.23978059325572, -2.6593014416465, -1.01699468138367,
0.904615947770596, 0.926960257201473, -0.447214785868854, 1.27329705840753,
-0.301976773562663, -1.49739733917499, 0.10022080021509, 0.10022080021509,
-0.301976773562663, -0.301976773562663, -0.726518656771293, -0.570108488744169,
-0.927617443660169, 0.290147433394023, 0.223114503090405, 0.658828542019967,
1.50791230843723, 0.81523871004709, -0.670657882188607, 0.334836052255776,
-1.37450363629968, 0.189598039949584, 0.558279148575528, 1.78721617933966,
0.144909419076843, 0.837583019477967, -0.659485728478663, 0.0555321813533371
), max_air_temp_C.4 = c(0.917750799315473, -0.496410528188183,
-0.0825096516437463, -0.0825096516437463, -0.542399514011008,
-2.27848374641345, -0.254968351583598, -0.266465597004552, -0.634377487726163,
-0.151493132447488, 0.699303115622301, -2.41645070595143, -1.16325082882766,
-1.16325082882766, 0.641816882309017, 0.699303115622301, -0.105504144555159,
-0.795338940175556, -0.645874733147118, 0.239413251185535, 0.308396731989277,
0.80277833475841, 1.63058008784728, 0.503849922771037, -1.40469300750175,
0.170429772451297, -0.726355459371813, 1.21667921130285, 2.18244792186019,
0.676308620641384, 0.446363689457753, 0.710800361043255, 0.308396731989277,
1.05571775885345), max_air_temp_C.5 = c(-1.67138854913074, -1.45389713786756,
0.126540458126549, 0.126540458126549, 0.489026145305106, 1.24299637432332,
0.0975416034654518, 0.0975416034654518, -0.699926908849354, -0.0184538177888326,
1.66347977082407, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), max_air_temp_C.6 = c(NA,
-0.671913331308388, 0.363696206895718, 0.363696206895718, NA,
-0.597941222070713, NA, -1.1034173074094, NA, 1.64587944699707,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), max_air_temp_C.7 = c(NA, -0.316357548422689,
-0.346016069199023, -0.346016069199023, NA, -0.0395446943684453,
NA, -0.90952795149279, NA, 1.95746233268197, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), max_air_temp_C.8 = c(NA, 0.923164964753146,
-1.20236607565684, -1.20236607565684, NA, 0.364762741324585,
NA, 0.0585421691212836, NA, 1.05826227611467, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), max_air_temp_C.9 = c(NA, 1.25268445710534, 0.0347967907651219,
0.0347967907651219, NA, NA, NA, -1.54265771222867, NA, 0.220379673593086,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), max_air_temp_C.10 = c(NA, 1.7863752785884,
-0.499222721070786, -0.499222721070786, NA, NA, NA, -0.393964918223415,
NA, -0.393964918223415, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA)), class = "data.frame", row.names = c(NA,
-34L)), max_percent_RH = structure(list(max_percent_RH.1 = c(0.0596455250653726,
1.05892417688524, 0.19190299368859, 0.19190299368859, 0.60337067384971,
-1.7331779384938, 0.618065948141179, -1.14536696683505, 0.985447805427894,
0.14046953366845, -0.263650509346937, -1.43927245266443, -1.40988190408149,
-1.40988190408149, 1.05892417688524, -1.08658586966918, 0.985447805427894,
1.05892417688524, -0.880852029588619, 0.941361982553489, -0.212217049326797,
-2.2695554501324, -0.33712688080428, 1.00014307971936, 0.471113205226493,
1.05892417688524, 0.765018691055865, 1.05892417688524, 1.05892417688524,
-1.05719532108624, -1.10862878110638, -0.102002492140782, 0.772366328201599,
0.375593922331947), max_percent_RH.2 = c(0.60296343327545, 0.60296343327545,
0.366051760725003, 0.366051760725003, 0.60296343327545, -1.13438883209449,
-3.09285865851152, -1.76615329222902, 0.60296343327545, 0.60296343327545,
0.60296343327545, 0.445022318241819, 0.460816429745181, 0.460816429745181,
0.60296343327545, 0.60296343327545, 0.287081203208188, 0.60296343327545,
-2.96650576648461, -1.48185928516848, -1.03962416307431, -0.186742141892706,
0.129140088174556, 0.60296343327545, -0.0288010268590746, 0.60296343327545,
-0.0288010268590746, 0.60296343327545, 0.60296343327545, 0.60296343327545,
-0.139359807382617, -0.297300922416248, 0.60296343327545, 0.60296343327545
), max_percent_RH.3 = c(0.671864840101553, 0.671864840101553,
0.671864840101553, 0.671864840101553, 0.671864840101553, 0.525620252627463,
-1.65342410073647, -0.746707658397117, 0.671864840101553, 0.671864840101553,
0.671864840101553, 0.525620252627463, 0.671864840101553, 0.671864840101553,
-1.34631046704088, -1.15619250332457, -1.17081696207198, -2.58938946057065,
-2.76488296553955, 0.101510948952603, 0.525620252627463, -1.33168600829348,
-0.790581034639343, 0.0868864902051944, 0.0868864902051944, 0.613367005111916,
0.0868864902051944, 0.671864840101553, 0.525620252627463, 0.671864840101553,
0.671864840101553, 0.394000123900782, 0.671864840101553, 0.671864840101553
), max_percent_RH.4 = c(0.663915891045687, 0.663915891045687,
0.154473713499614, 0.154473713499614, 0.663915891045687, -2.48977377947762,
0.142344137843755, 0.663915891045687, -0.512652947572625, 0.663915891045687,
0.663915891045687, -3.46013983194633, -0.3428388883906, -0.3428388883906,
-0.0881177996175639, 0.0938258352203193, 0.639656739733969, 0.663915891045687,
0.603268012766393, -0.0638586483058458, -0.330709312734742, -0.209413556176153,
-0.427745917981612, 0.0453075325968848, 0.178732864811332, 0.251510318746484,
-2.7323652925948, 0.663915891045687, 0.542620134487098, 0.663915891045687,
0.324287772681639, 0.566879285798816, 0.663915891045687, 0.663915891045687
), max_percent_RH.5 = c(-1.73053052256212, 0.581107398283796,
0.581107398283796, 0.581107398283796, -1.30840533701635, 0.581107398283796,
0.581107398283796, 0.581107398283796, -1.6099233266919, 0.581107398283796,
0.581107398283796, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), max_percent_RH.6 = c(NA,
0.566556887333738, 0.149227037288797, 0.149227037288797, NA,
-1.99812473657881, NA, 0.566556887333738, NA, 0.566556887333738,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), max_percent_RH.7 = c(NA, 0.793878974139019,
-1.22058892273874, -1.22058892273874, NA, -0.0198469743534753,
NA, 0.83357292284597, NA, 0.83357292284597, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA), max_percent_RH.8 = c(NA, 0.701221775882323, -1.28570561172535,
-1.28570561172535, NA, 0.467745895803724, NA, 0.701221775882323,
NA, 0.701221775882323, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), max_percent_RH.9 = c(NA,
0.897941653226101, -1.066305713206, -1.066305713206, NA, NA,
NA, 0.336728119959786, NA, 0.897941653226101, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), max_percent_RH.10 = c(NA, 0.896258159530275,
-0.128036879932895, -0.128036879932895, NA, NA, NA, 0.896258159530275,
NA, -1.53644255919475, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA)), class = "data.frame", row.names = c(NA,
-34L)), min_percent_RH = structure(list(min_percent_RH.1 = c(0.280939125470438,
-0.135483760354185, -1.40317820923622, -1.40317820923622, -0.581387912431879,
-1.17101323749329, -0.212872084268495, 0.56101115487461, -0.76564582651357,
-0.839348992146247, -0.41924094803999, -1.13416165467695, -1.15258744608512,
-1.15258744608512, 0.0229780457560698, 0.505733780650102, 1.26119122838504,
1.69972506389946, -0.555591804460442, 0.325161024850044, -0.113372810664382,
-0.931477949187093, -1.06045848904428, 1.63707737311169, 0.450456406425595,
1.7034102221811, 0.303050075160241, 1.7034102221811, 1.7034102221811,
-0.618239495248217, 0.616288529099117, -0.699312977444162, 1.06956299774008,
0.505733780650102), min_percent_RH.2 = c(0.0676741919390416,
1.95165102524873, -2.06852904801593, -2.06852904801593, 2.3222694186867,
-0.817691970162779, -0.0816026609734749, -0.354418978365315,
0.690518992022298, -0.220584558512714, 0.566979527542975, -0.148519870899775,
0.0728216696256798, 0.0728216696256798, -0.98241125613521, -0.400746277545061,
-0.508843308964469, -1.58981362315855, -0.570613041204131, 0.191213656418365,
0.114001491118788, -0.169109781646329, -0.766217193296394, -0.534580697397662,
0.366227897764074, 0.031641848132572, 1.292773881359, 0.75228872426196,
0.947892876354223, -0.658120161876985, 0.0573792365657644, -0.498548353591192,
1.67883470785689, 1.26188901523917), min_percent_RH.3 = c(1.86051740977938,
-0.689592949926057, -1.52312416782331, -1.52312416782331, 1.86051740977938,
0.45754407272461, -0.924797303491122, -0.846395852302767, 0.428659327549953,
-0.0376229874123686, 1.83163266460473, 0.416280151046529, -1.48186024614522,
-1.48186024614522, 0.0572840324472189, 0.441038504053377, -1.14762248055276,
-1.30855177509728, -1.07747381370002, 0.0944215619574926, 0.0325256794403702,
0.185202189649272, -0.367734360837021, -0.466767772864417, 1.03523897621775,
-0.334723223494556, -0.32647043915894, 0.812413799156112, 0.622599759436937,
0.160443836642423, 0.977469485868438, 0.0118937186013294, 1.59230191887185,
0.65973728894721), min_percent_RH.4 = c(-0.615237620863046, -0.566146952809827,
-0.593419546172726, -0.593419546172726, -1.20432563750166, -0.527965322101769,
0.699301379228687, 1.02657249958348, 0.508393225688394, 2.90838144162351,
1.69747829631079, -0.309784575198576, -1.34068860431616, -1.34068860431616,
0.961118275512517, 0.595665524449671, -0.631601176880785, -0.680691844934003,
-1.14978045077587, -0.522510803429189, -0.358875243251795, 0.388393814891638,
-0.20069420174698, -0.0534221975873256, 0.0174865451562117, 0.644756192502889,
-1.45523349644034, 1.00475442489316, 0.835664346043182, -0.0588767162599055,
-0.413420429977593, -1.07887170803233, 1.70293281498337, 0.704755897901267
), min_percent_RH.5 = c(-0.253861459079237, 1.19713099820699,
-0.801405782583473, -0.801405782583473, -1.44933323206349, -1.0249863813477,
0.311934341875141, 0.339311558050353, 0.485323377651482, 1.89981288003743,
0.0974794818359813, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), min_percent_RH.6 = c(NA,
-1.02039676293566, -0.747424380494274, -0.747424380494274, NA,
0.572870612130394, NA, 0.411315528644675, NA, 1.53105938314914,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), min_percent_RH.7 = c(NA, -0.791790120060484,
-0.583652520044585, -0.583652520044585, NA, -0.214208280016363,
NA, 0.285321960021796, NA, 1.88798148014422, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), min_percent_RH.8 = c(NA, -0.823388941971144,
-0.484437479016857, -0.484437479016857, NA, -0.252278942746798,
NA, 0.100602032383692, NA, 1.94394081036796, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA), min_percent_RH.9 = c(NA, -0.806517055346018,
-0.672450353232506, -0.672450353232506, NA, NA, NA, 0.819923725557369,
NA, 1.33149403625366, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), min_percent_RH.10 = c(NA,
-0.973458214944405, -0.575093618054954, -0.575093618054954, NA,
NA, NA, 0.801074989381333, NA, 1.32257046167298, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA)), class = "data.frame", row.names = c(NA,
-34L)), doy = structure(list(doy.1 = c(-1.49457334197023, -1.45698791768991,
-1.1938899477277, -1.1938899477277, -0.667694007803267, -1.56974419053086,
0.121599902083376, 0.121599902083376, 0.384697872045591, 0.722966690568438,
0.760552114848755, -1.56974419053086, -0.818035704924533, -0.818035704924533,
-0.517352310682002, -0.517352310682002, -0.254254340719787, -0.254254340719787,
0.00884362924242735, 0.271941599204642, 0.271941599204642, 0.535039569166856,
0.535039569166856, 0.798137539129071, -1.15630452344738, 0.798137539129071,
-1.11871909916706, 1.06123550909129, 1.06123550909129, 1.3243334790535,
1.3243334790535, 1.3243334790535, 1.58743144901571, 1.58743144901571
), doy.2 = c(-1.49457334197023, -1.45698791768991, -1.1938899477277,
-1.1938899477277, -0.667694007803267, -1.56974419053086, 0.121599902083376,
0.121599902083376, 0.384697872045591, 0.722966690568438, 0.760552114848755,
-1.56974419053086, -0.818035704924533, -0.818035704924533, -0.517352310682002,
-0.517352310682002, -0.254254340719787, -0.254254340719787, 0.00884362924242735,
0.271941599204642, 0.271941599204642, 0.535039569166856, 0.535039569166856,
0.798137539129071, -1.15630452344738, 0.798137539129071, -1.11871909916706,
1.06123550909129, 1.06123550909129, 1.3243334790535, 1.3243334790535,
1.3243334790535, 1.58743144901571, 1.58743144901571), doy.3 = c(-1.49457334197023,
-1.45698791768991, -1.1938899477277, -1.1938899477277, -0.667694007803267,
-1.56974419053086, 0.121599902083376, 0.121599902083376, 0.384697872045591,
0.722966690568438, 0.760552114848755, -1.56974419053086, -0.818035704924533,
-0.818035704924533, -0.517352310682002, -0.517352310682002, -0.254254340719787,
-0.254254340719787, 0.00884362924242735, 0.271941599204642, 0.271941599204642,
0.535039569166856, 0.535039569166856, 0.798137539129071, -1.15630452344738,
0.798137539129071, -1.11871909916706, 1.06123550909129, 1.06123550909129,
1.3243334790535, 1.3243334790535, 1.3243334790535, 1.58743144901571,
1.58743144901571), doy.4 = c(-1.49457334197023, -1.45698791768991,
-1.1938899477277, -1.1938899477277, -0.667694007803267, -1.56974419053086,
0.121599902083376, 0.121599902083376, 0.384697872045591, 0.722966690568438,
0.760552114848755, -1.56974419053086, -0.818035704924533, -0.818035704924533,
-0.517352310682002, -0.517352310682002, -0.254254340719787, -0.254254340719787,
0.00884362924242735, 0.271941599204642, 0.271941599204642, 0.535039569166856,
0.535039569166856, 0.798137539129071, -1.15630452344738, 0.798137539129071,
-1.11871909916706, 1.06123550909129, 1.06123550909129, 1.3243334790535,
1.3243334790535, 1.3243334790535, 1.58743144901571, 1.58743144901571
), doy.5 = c(-1.30459446461163, -1.26110798245791, -0.956702607381863,
-0.956702607381863, -0.347891857229768, 0.260918892922326, 0.565324267998374,
0.565324267998374, 0.869729643074421, 1.26110798245791, 1.30459446461163,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA), doy.6 = c(NA, -1.05873648876414,
-0.760300699984984, -0.760300699984984, NA, 0.433442455131627,
NA, 0.731878243910779, NA, 1.4140171896917, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA), doy.7 = c(NA, -1.05873648876414, -0.760300699984984,
-0.760300699984984, NA, 0.433442455131627, NA, 0.731878243910779,
NA, 1.4140171896917, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), doy.8 = c(NA,
-1.05873648876414, -0.760300699984984, -0.760300699984984, NA,
0.433442455131627, NA, 0.731878243910779, NA, 1.4140171896917,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA), doy.9 = c(NA, -0.889715873362349,
-0.616557491189698, -0.616557491189698, NA, NA, NA, 0.749234419673558,
NA, 1.37359643606819, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA), doy.10 = c(NA,
-0.889715873362349, -0.616557491189698, -0.616557491189698, NA,
NA, NA, 0.749234419673558, NA, 1.37359643606819, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA)), class = "data.frame", row.names = c(NA,
-34L)))
> dput(site_covs) # Site covariates
structure(list(avg_depth_m = c(-0.396852937869769, -0.143546538414424,
-0.330422948982401, -0.741865130232904, 0.686928042442984, -0.0101036528084492,
0.166867219195688, -0.109197376901493, -0.509447409526513, -0.407372059216273,
0.1391236624447, 0.990275045031617, -0.442967565991126, -0.244051498719891,
0.0825896222728747, -1.26323461181751, 0.414988839949808, 0.168961072535385,
4.65870609618114, 0.617569150565513, -0.717262353491461, -0.688471870070625,
-1.18052740489947, -0.50421277617727, 0.232300136061226, -0.787406440371318,
0.0818044272704883, 0.25952022947729, 0.179430339233871, 0.185711899252963,
-0.253997302083453, -1.23863183507607, 1.01121357842859, 0.093582352306285
), avg_veg_percent = c(-0.981252911640175, -0.932578362902605,
-0.363792708244395, 0.62952136981813, -0.444164594228708, -0.191952226559776,
0.0731006206959681, -1.11471538417126, -0.813050942720807, -0.289603275028107,
0.608913193924716, 2.04324223610629, -0.837780753792903, -0.685280252181644,
-1.13041685147937, -0.236022017705233, 1.56925419055778, -0.738861509504519,
-0.165954219667627, 0.163776594626987, 0.29154728516615, -0.153589314131579,
1.7794575846706, -0.314333086100203, -0.982905697733348, -0.359671073065713,
-1.06859232379913, 0.547088666244476, -0.520414845034337, 1.40438878341047,
-0.458590317354097, 1.32195607983682, 2.82223128487731, -0.470955222890145
), Trachemys_present = structure(c(1L, 1L, 2L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L), levels = c("0",
"1"), class = "factor"), Chrysemys_present = structure(c(1L,
1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L,
2L), levels = c("0", "1"), class = "factor"), urban_percent_2023_500m = c(-0.969742561719032,
-0.614368896225784, -0.561960459836506, -1.08241897426301, -0.958305252669325,
-0.882140705481457, -0.398730625289142, -0.412171084097736, -0.521958411757194,
1.13904289232575, -0.923435599096305, 0.88617603233421, -0.0529401814644404,
-0.303923239336219, 1.15264545027027, -1.0168973175224, 0.981094915798906,
1.94259731493199, -0.465912355297317, 0.884019313111931, -1.13846503050023,
-0.501578027387552, 0.761456544435323, 2.28219290951455, -0.689483768090551,
2.03404429383584, -0.464171141440133, 0.218341471324137, -0.953800010013493,
0.136445123262079, -1.22508166293566, 1.31882364835239, -0.192327342690211,
0.592932737616315), forest_percent_2023_500m = c(1.89411988963412,
-0.786652867191391, 0.562610558234537, 1.1783690039086, -0.0226232839207373,
-0.00607577651606223, 0.737291780476629, -0.893251563484275,
-0.436829851717775, -0.890481381943574, 0.587444687013665, -1.04719621818673,
0.424620997830237, 0.0897363697825507, -0.0494370648196247, 0.413919534898465,
-0.92039247204009, -0.909702597986621, 1.14347273198409, -0.898988205948345,
-0.541518666619878, 0.460502845513551, -0.869008512376215, -1.29844209144976,
0.233211682890451, -0.600962224939457, -0.43929957466133, -0.526918387485172,
2.54805625793507, -0.822396406897255, 2.43419507895804, -0.0611648985577873,
0.657477617957097, -1.34368699027501), min_dist_at_site_m = c(-0.295579037282997,
-0.406168740319293, -0.343210284897073, -0.253317324110564, 0.641800055792079,
1.51151668973138, -0.443887345591638, -0.409370993417729, -0.443887345591638,
-0.229694856031288, -0.360065411646804, 3.12993883706238, -0.443887345591638,
-0.443887345591638, -0.20316525015156, -0.366504625495844, 0.217965039546236,
-0.390635541727046, -0.0332391639833308, 4.09085344956443, -0.443887345591638,
-0.419384931106703, -0.431353535904455, -0.408872255087999, -0.391298796897592,
-0.382538497711036, -0.00435689255584056, -0.180163140796787,
-0.428768504246683, -0.419274900127415, -0.443887345591638, -0.172814345147779,
-0.42123687211955, 0.0222639026186883), Open_to_Public = structure(c(2L,
1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L,
2L), levels = c("0", "1"), class = "factor")), class = "data.frame", row.names = c(NA,
-34L))
> dput(umf) # For unmarked
new("unmarkedFrameOccu", y = structure(c(1, 0, 1, 0, 0, 1, 0,
1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0,
0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0,
1, 0, 1, 0, 0, 0, 0, 1, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1,
1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, 0, 0, 0, NA, 0, NA, 0, NA, 1, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, 0, 0, 0, NA, 0, NA, 1, NA, 1, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, 1, 0, 0, NA, 0, NA, 0, NA, 1, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, 0, 0, 0, NA, NA, NA, 0, NA, 0, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, 0, 0, 1, NA, NA, NA, 0, NA, 0, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA), dim = c(34L, 10L), dimnames = list(
    NULL, c("so.1", "so.2", "so.3", "so.4", "so.5", "so.6", "so.7",
    "so.8", "so.9", "so.10"))), obsCovs = structure(list(max_air_temp_C = c(-0.459496711703865,
-0.303742800714979, -1.84373413837006, 0.917750799315473, -1.67138854913074,
NA, NA, NA, NA, NA, -0.580604373234465, -1.41065499263084, 0.111392955936023,
-0.496410528188183, -1.45389713786756, -0.671913331308388, -0.316357548422689,
0.923164964753146, 1.25268445710534, 1.7863752785884, 0.424589209185752,
0.979804314811402, 1.23978059325572, -0.0825096516437463, 0.126540458126549,
0.363696206895718, -0.346016069199023, -1.20236607565684, 0.0347967907651219,
-0.499222721070786, 0.424589209185752, 0.979804314811402, 1.23978059325572,
-0.0825096516437463, 0.126540458126549, 0.363696206895718, -0.346016069199023,
-1.20236607565684, 0.0347967907651219, -0.499222721070786, -0.738044331480295,
-2.48224020109637, -2.6593014416465, -0.542399514011008, 0.489026145305106,
NA, NA, NA, NA, NA, -2.04600706554707, -0.657012650055633, -1.01699468138367,
-2.27848374641345, 1.24299637432332, -0.597941222070713, -0.0395446943684453,
0.364762741324585, NA, NA, 1.5630012201616, 0.43812388141666,
0.904615947770596, -0.254968351583598, 0.0975416034654518, NA,
NA, NA, NA, NA, 0.642582998196882, 0.67363711360389, 0.926960257201473,
-0.266465597004552, 0.0975416034654518, -1.1034173074094, -0.90952795149279,
0.0585421691212836, -1.54265771222867, -0.393964918223415, -0.277835221587903,
-1.04560948284662, -0.447214785868854, -0.634377487726163, -0.699926908849354,
NA, NA, NA, NA, NA, 1.67199811466717, 1.73344665950623, 1.27329705840753,
-0.151493132447488, -0.0184538177888326, 1.64587944699707, 1.95746233268197,
1.05826227611467, 0.220379673593086, -0.393964918223415, 1.5630012201616,
0.803169391200885, -0.301976773562663, 0.699303115622301, 1.66347977082407,
NA, NA, NA, NA, NA, -1.88856710730124, -0.715890958632345, -1.49739733917499,
-2.41645070595143, NA, NA, NA, NA, NA, NA, 0.24292771906979,
-0.551031695465399, 0.10022080021509, -1.16325082882766, NA,
NA, NA, NA, NA, NA, 0.24292771906979, -0.551031695465399, 0.10022080021509,
-1.16325082882766, NA, NA, NA, NA, NA, NA, 0.860576787208012,
-0.56280735590897, -0.301976773562663, 0.641816882309017, NA,
NA, NA, NA, NA, NA, 0.30348154983509, -0.680563973062394, -0.301976773562663,
0.699303115622301, NA, NA, NA, NA, NA, NA, -0.435275179833732,
-1.36355234661732, -0.726518656771293, -0.105504144555159, NA,
NA, NA, NA, NA, NA, -1.04081348312686, -0.84542323622934, -0.570108488744169,
-0.795338940175556, NA, NA, NA, NA, NA, NA, 1.12701364213934,
-0.162434862674413, -0.927617443660169, -0.645874733147118, NA,
NA, NA, NA, NA, NA, 0.824244490492783, 0.968028654367831, 0.290147433394023,
0.239413251185535, NA, NA, NA, NA, NA, NA, 0.872687554233047,
1.00335563781816, 0.223114503090405, 0.308396731989277, NA, NA,
NA, NA, NA, NA, -0.302056753458035, 0.508777850436943, 0.658828542019967,
0.80277833475841, NA, NA, NA, NA, NA, NA, 0.800022958622649,
1.38017681016558, 1.50791230843723, 1.63058008784728, NA, NA,
NA, NA, NA, NA, -1.25880727213799, 0.461675204423421, 0.81523871004709,
0.503849922771037, NA, NA, NA, NA, NA, NA, -1.73112714905541,
-0.185986185681174, -0.670657882188607, -1.40469300750175, NA,
NA, NA, NA, NA, NA, -1.19825344137269, 0.143732340652719, 0.334836052255776,
0.170429772451297, NA, NA, NA, NA, NA, NA, -0.338389052353203,
-0.386172432298452, -1.37450363629968, -0.726355459371813, NA,
NA, NA, NA, NA, NA, -0.641158203999765, 1.02690696294454, 0.189598039949584,
1.21667921130285, NA, NA, NA, NA, NA, NA, -0.665379735869898,
0.838496376770836, 0.558279148575528, 2.18244792186019, NA, NA,
NA, NA, NA, NA, 1.23601053664491, 1.40372813317234, 1.78721617933966,
0.676308620641384, NA, NA, NA, NA, NA, NA, 0.279260017964958,
0.449899541860231, 0.144909419076843, 0.446363689457753, NA,
NA, NA, NA, NA, NA, 1.01801674763378, 0.744291082624172, 0.837583019477967,
0.710800361043255, NA, NA, NA, NA, NA, NA, 0.0733769937989247,
-1.45775764076398, -0.659485728478663, 0.308396731989277, NA,
NA, NA, NA, NA, NA, -0.568493606209429, -1.17514176044361, 0.0555321813533371,
1.05571775885345, NA, NA, NA, NA, NA, NA), max_percent_RH = c(0.0596455250653726,
0.60296343327545, 0.671864840101553, 0.663915891045687, -1.73053052256212,
NA, NA, NA, NA, NA, 1.05892417688524, 0.60296343327545, 0.671864840101553,
0.663915891045687, 0.581107398283796, 0.566556887333738, 0.793878974139019,
0.701221775882323, 0.897941653226101, 0.896258159530275, 0.19190299368859,
0.366051760725003, 0.671864840101553, 0.154473713499614, 0.581107398283796,
0.149227037288797, -1.22058892273874, -1.28570561172535, -1.066305713206,
-0.128036879932895, 0.19190299368859, 0.366051760725003, 0.671864840101553,
0.154473713499614, 0.581107398283796, 0.149227037288797, -1.22058892273874,
-1.28570561172535, -1.066305713206, -0.128036879932895, 0.60337067384971,
0.60296343327545, 0.671864840101553, 0.663915891045687, -1.30840533701635,
NA, NA, NA, NA, NA, -1.7331779384938, -1.13438883209449, 0.525620252627463,
-2.48977377947762, 0.581107398283796, -1.99812473657881, -0.0198469743534753,
0.467745895803724, NA, NA, 0.618065948141179, -3.09285865851152,
-1.65342410073647, 0.142344137843755, 0.581107398283796, NA,
NA, NA, NA, NA, -1.14536696683505, -1.76615329222902, -0.746707658397117,
0.663915891045687, 0.581107398283796, 0.566556887333738, 0.83357292284597,
0.701221775882323, 0.336728119959786, 0.896258159530275, 0.985447805427894,
0.60296343327545, 0.671864840101553, -0.512652947572625, -1.6099233266919,
NA, NA, NA, NA, NA, 0.14046953366845, 0.60296343327545, 0.671864840101553,
0.663915891045687, 0.581107398283796, 0.566556887333738, 0.83357292284597,
0.701221775882323, 0.897941653226101, -1.53644255919475, -0.263650509346937,
0.60296343327545, 0.671864840101553, 0.663915891045687, 0.581107398283796,
NA, NA, NA, NA, NA, -1.43927245266443, 0.445022318241819, 0.525620252627463,
-3.46013983194633, NA, NA, NA, NA, NA, NA, -1.40988190408149,
0.460816429745181, 0.671864840101553, -0.3428388883906, NA, NA,
NA, NA, NA, NA, -1.40988190408149, 0.460816429745181, 0.671864840101553,
-0.3428388883906, NA, NA, NA, NA, NA, NA, 1.05892417688524, 0.60296343327545,
-1.34631046704088, -0.0881177996175639, NA, NA, NA, NA, NA, NA,
-1.08658586966918, 0.60296343327545, -1.15619250332457, 0.0938258352203193,
NA, NA, NA, NA, NA, NA, 0.985447805427894, 0.287081203208188,
-1.17081696207198, 0.639656739733969, NA, NA, NA, NA, NA, NA,
1.05892417688524, 0.60296343327545, -2.58938946057065, 0.663915891045687,
NA, NA, NA, NA, NA, NA, -0.880852029588619, -2.96650576648461,
-2.76488296553955, 0.603268012766393, NA, NA, NA, NA, NA, NA,
0.941361982553489, -1.48185928516848, 0.101510948952603, -0.0638586483058458,
NA, NA, NA, NA, NA, NA, -0.212217049326797, -1.03962416307431,
0.525620252627463, -0.330709312734742, NA, NA, NA, NA, NA, NA,
-2.2695554501324, -0.186742141892706, -1.33168600829348, -0.209413556176153,
NA, NA, NA, NA, NA, NA, -0.33712688080428, 0.129140088174556,
-0.790581034639343, -0.427745917981612, NA, NA, NA, NA, NA, NA,
1.00014307971936, 0.60296343327545, 0.0868864902051944, 0.0453075325968848,
NA, NA, NA, NA, NA, NA, 0.471113205226493, -0.0288010268590746,
0.0868864902051944, 0.178732864811332, NA, NA, NA, NA, NA, NA,
1.05892417688524, 0.60296343327545, 0.613367005111916, 0.251510318746484,
NA, NA, NA, NA, NA, NA, 0.765018691055865, -0.0288010268590746,
0.0868864902051944, -2.7323652925948, NA, NA, NA, NA, NA, NA,
1.05892417688524, 0.60296343327545, 0.671864840101553, 0.663915891045687,
NA, NA, NA, NA, NA, NA, 1.05892417688524, 0.60296343327545, 0.525620252627463,
0.542620134487098, NA, NA, NA, NA, NA, NA, -1.05719532108624,
0.60296343327545, 0.671864840101553, 0.663915891045687, NA, NA,
NA, NA, NA, NA, -1.10862878110638, -0.139359807382617, 0.671864840101553,
0.324287772681639, NA, NA, NA, NA, NA, NA, -0.102002492140782,
-0.297300922416248, 0.394000123900782, 0.566879285798816, NA,
NA, NA, NA, NA, NA, 0.772366328201599, 0.60296343327545, 0.671864840101553,
0.663915891045687, NA, NA, NA, NA, NA, NA, 0.375593922331947,
0.60296343327545, 0.671864840101553, 0.663915891045687, NA, NA,
NA, NA, NA, NA), min_percent_RH = c(0.280939125470438, 0.0676741919390416,
1.86051740977938, -0.615237620863046, -0.253861459079237, NA,
NA, NA, NA, NA, -0.135483760354185, 1.95165102524873, -0.689592949926057,
-0.566146952809827, 1.19713099820699, -1.02039676293566, -0.791790120060484,
-0.823388941971144, -0.806517055346018, -0.973458214944405, -1.40317820923622,
-2.06852904801593, -1.52312416782331, -0.593419546172726, -0.801405782583473,
-0.747424380494274, -0.583652520044585, -0.484437479016857, -0.672450353232506,
-0.575093618054954, -1.40317820923622, -2.06852904801593, -1.52312416782331,
-0.593419546172726, -0.801405782583473, -0.747424380494274, -0.583652520044585,
-0.484437479016857, -0.672450353232506, -0.575093618054954, -0.581387912431879,
2.3222694186867, 1.86051740977938, -1.20432563750166, -1.44933323206349,
NA, NA, NA, NA, NA, -1.17101323749329, -0.817691970162779, 0.45754407272461,
-0.527965322101769, -1.0249863813477, 0.572870612130394, -0.214208280016363,
-0.252278942746798, NA, NA, -0.212872084268495, -0.0816026609734749,
-0.924797303491122, 0.699301379228687, 0.311934341875141, NA,
NA, NA, NA, NA, 0.56101115487461, -0.354418978365315, -0.846395852302767,
1.02657249958348, 0.339311558050353, 0.411315528644675, 0.285321960021796,
0.100602032383692, 0.819923725557369, 0.801074989381333, -0.76564582651357,
0.690518992022298, 0.428659327549953, 0.508393225688394, 0.485323377651482,
NA, NA, NA, NA, NA, -0.839348992146247, -0.220584558512714, -0.0376229874123686,
2.90838144162351, 1.89981288003743, 1.53105938314914, 1.88798148014422,
1.94394081036796, 1.33149403625366, 1.32257046167298, -0.41924094803999,
0.566979527542975, 1.83163266460473, 1.69747829631079, 0.0974794818359813,
NA, NA, NA, NA, NA, -1.13416165467695, -0.148519870899775, 0.416280151046529,
-0.309784575198576, NA, NA, NA, NA, NA, NA, -1.15258744608512,
0.0728216696256798, -1.48186024614522, -1.34068860431616, NA,
NA, NA, NA, NA, NA, -1.15258744608512, 0.0728216696256798, -1.48186024614522,
-1.34068860431616, NA, NA, NA, NA, NA, NA, 0.0229780457560698,
-0.98241125613521, 0.0572840324472189, 0.961118275512517, NA,
NA, NA, NA, NA, NA, 0.505733780650102, -0.400746277545061, 0.441038504053377,
0.595665524449671, NA, NA, NA, NA, NA, NA, 1.26119122838504,
-0.508843308964469, -1.14762248055276, -0.631601176880785, NA,
NA, NA, NA, NA, NA, 1.69972506389946, -1.58981362315855, -1.30855177509728,
-0.680691844934003, NA, NA, NA, NA, NA, NA, -0.555591804460442,
-0.570613041204131, -1.07747381370002, -1.14978045077587, NA,
NA, NA, NA, NA, NA, 0.325161024850044, 0.191213656418365, 0.0944215619574926,
-0.522510803429189, NA, NA, NA, NA, NA, NA, -0.113372810664382,
0.114001491118788, 0.0325256794403702, -0.358875243251795, NA,
NA, NA, NA, NA, NA, -0.931477949187093, -0.169109781646329, 0.185202189649272,
0.388393814891638, NA, NA, NA, NA, NA, NA, -1.06045848904428,
-0.766217193296394, -0.367734360837021, -0.20069420174698, NA,
NA, NA, NA, NA, NA, 1.63707737311169, -0.534580697397662, -0.466767772864417,
-0.0534221975873256, NA, NA, NA, NA, NA, NA, 0.450456406425595,
0.366227897764074, 1.03523897621775, 0.0174865451562117, NA,
NA, NA, NA, NA, NA, 1.7034102221811, 0.031641848132572, -0.334723223494556,
0.644756192502889, NA, NA, NA, NA, NA, NA, 0.303050075160241,
1.292773881359, -0.32647043915894, -1.45523349644034, NA, NA,
NA, NA, NA, NA, 1.7034102221811, 0.75228872426196, 0.812413799156112,
1.00475442489316, NA, NA, NA, NA, NA, NA, 1.7034102221811, 0.947892876354223,
0.622599759436937, 0.835664346043182, NA, NA, NA, NA, NA, NA,
-0.618239495248217, -0.658120161876985, 0.160443836642423, -0.0588767162599055,
NA, NA, NA, NA, NA, NA, 0.616288529099117, 0.0573792365657644,
0.977469485868438, -0.413420429977593, NA, NA, NA, NA, NA, NA,
-0.699312977444162, -0.498548353591192, 0.0118937186013294, -1.07887170803233,
NA, NA, NA, NA, NA, NA, 1.06956299774008, 1.67883470785689, 1.59230191887185,
1.70293281498337, NA, NA, NA, NA, NA, NA, 0.505733780650102,
1.26188901523917, 0.65973728894721, 0.704755897901267, NA, NA,
NA, NA, NA, NA), doy = c(-1.49457334197023, -1.49457334197023,
-1.49457334197023, -1.49457334197023, -1.30459446461163, NA,
NA, NA, NA, NA, -1.45698791768991, -1.45698791768991, -1.45698791768991,
-1.45698791768991, -1.26110798245791, -1.05873648876414, -1.05873648876414,
-1.05873648876414, -0.889715873362349, -0.889715873362349, -1.1938899477277,
-1.1938899477277, -1.1938899477277, -1.1938899477277, -0.956702607381863,
-0.760300699984984, -0.760300699984984, -0.760300699984984, -0.616557491189698,
-0.616557491189698, -1.1938899477277, -1.1938899477277, -1.1938899477277,
-1.1938899477277, -0.956702607381863, -0.760300699984984, -0.760300699984984,
-0.760300699984984, -0.616557491189698, -0.616557491189698, -0.667694007803267,
-0.667694007803267, -0.667694007803267, -0.667694007803267, -0.347891857229768,
NA, NA, NA, NA, NA, -1.56974419053086, -1.56974419053086, -1.56974419053086,
-1.56974419053086, 0.260918892922326, 0.433442455131627, 0.433442455131627,
0.433442455131627, NA, NA, 0.121599902083376, 0.121599902083376,
0.121599902083376, 0.121599902083376, 0.565324267998374, NA,
NA, NA, NA, NA, 0.121599902083376, 0.121599902083376, 0.121599902083376,
0.121599902083376, 0.565324267998374, 0.731878243910779, 0.731878243910779,
0.731878243910779, 0.749234419673558, 0.749234419673558, 0.384697872045591,
0.384697872045591, 0.384697872045591, 0.384697872045591, 0.869729643074421,
NA, NA, NA, NA, NA, 0.722966690568438, 0.722966690568438, 0.722966690568438,
0.722966690568438, 1.26110798245791, 1.4140171896917, 1.4140171896917,
1.4140171896917, 1.37359643606819, 1.37359643606819, 0.760552114848755,
0.760552114848755, 0.760552114848755, 0.760552114848755, 1.30459446461163,
NA, NA, NA, NA, NA, -1.56974419053086, -1.56974419053086, -1.56974419053086,
-1.56974419053086, NA, NA, NA, NA, NA, NA, -0.818035704924533,
-0.818035704924533, -0.818035704924533, -0.818035704924533, NA,
NA, NA, NA, NA, NA, -0.818035704924533, -0.818035704924533, -0.818035704924533,
-0.818035704924533, NA, NA, NA, NA, NA, NA, -0.517352310682002,
-0.517352310682002, -0.517352310682002, -0.517352310682002, NA,
NA, NA, NA, NA, NA, -0.517352310682002, -0.517352310682002, -0.517352310682002,
-0.517352310682002, NA, NA, NA, NA, NA, NA, -0.254254340719787,
-0.254254340719787, -0.254254340719787, -0.254254340719787, NA,
NA, NA, NA, NA, NA, -0.254254340719787, -0.254254340719787, -0.254254340719787,
-0.254254340719787, NA, NA, NA, NA, NA, NA, 0.00884362924242735,
0.00884362924242735, 0.00884362924242735, 0.00884362924242735,
NA, NA, NA, NA, NA, NA, 0.271941599204642, 0.271941599204642,
0.271941599204642, 0.271941599204642, NA, NA, NA, NA, NA, NA,
0.271941599204642, 0.271941599204642, 0.271941599204642, 0.271941599204642,
NA, NA, NA, NA, NA, NA, 0.535039569166856, 0.535039569166856,
0.535039569166856, 0.535039569166856, NA, NA, NA, NA, NA, NA,
0.535039569166856, 0.535039569166856, 0.535039569166856, 0.535039569166856,
NA, NA, NA, NA, NA, NA, 0.798137539129071, 0.798137539129071,
0.798137539129071, 0.798137539129071, NA, NA, NA, NA, NA, NA,
-1.15630452344738, -1.15630452344738, -1.15630452344738, -1.15630452344738,
NA, NA, NA, NA, NA, NA, 0.798137539129071, 0.798137539129071,
0.798137539129071, 0.798137539129071, NA, NA, NA, NA, NA, NA,
-1.11871909916706, -1.11871909916706, -1.11871909916706, -1.11871909916706,
NA, NA, NA, NA, NA, NA, 1.06123550909129, 1.06123550909129, 1.06123550909129,
1.06123550909129, NA, NA, NA, NA, NA, NA, 1.06123550909129, 1.06123550909129,
1.06123550909129, 1.06123550909129, NA, NA, NA, NA, NA, NA, 1.3243334790535,
1.3243334790535, 1.3243334790535, 1.3243334790535, NA, NA, NA,
NA, NA, NA, 1.3243334790535, 1.3243334790535, 1.3243334790535,
1.3243334790535, NA, NA, NA, NA, NA, NA, 1.3243334790535, 1.3243334790535,
1.3243334790535, 1.3243334790535, NA, NA, NA, NA, NA, NA, 1.58743144901571,
1.58743144901571, 1.58743144901571, 1.58743144901571, NA, NA,
NA, NA, NA, NA, 1.58743144901571, 1.58743144901571, 1.58743144901571,
1.58743144901571, NA, NA, NA, NA, NA, NA)), row.names = c(NA,
-340L), class = "data.frame"), siteCovs = structure(list(avg_depth_m = c(-0.396852937869769,
-0.143546538414424, -0.330422948982401, -0.741865130232904, 0.686928042442984,
-0.0101036528084492, 0.166867219195688, -0.109197376901493, -0.509447409526513,
-0.407372059216273, 0.1391236624447, 0.990275045031617, -0.442967565991126,
-0.244051498719891, 0.0825896222728747, -1.26323461181751, 0.414988839949808,
0.168961072535385, 4.65870609618114, 0.617569150565513, -0.717262353491461,
-0.688471870070625, -1.18052740489947, -0.50421277617727, 0.232300136061226,
-0.787406440371318, 0.0818044272704883, 0.25952022947729, 0.179430339233871,
0.185711899252963, -0.253997302083453, -1.23863183507607, 1.01121357842859,
0.093582352306285), avg_veg_percent = c(-0.981252911640175, -0.932578362902605,
-0.363792708244395, 0.62952136981813, -0.444164594228708, -0.191952226559776,
0.0731006206959681, -1.11471538417126, -0.813050942720807, -0.289603275028107,
0.608913193924716, 2.04324223610629, -0.837780753792903, -0.685280252181644,
-1.13041685147937, -0.236022017705233, 1.56925419055778, -0.738861509504519,
-0.165954219667627, 0.163776594626987, 0.29154728516615, -0.153589314131579,
1.7794575846706, -0.314333086100203, -0.982905697733348, -0.359671073065713,
-1.06859232379913, 0.547088666244476, -0.520414845034337, 1.40438878341047,
-0.458590317354097, 1.32195607983682, 2.82223128487731, -0.470955222890145
), Trachemys_present = structure(c(1L, 1L, 2L, 1L, 1L, 1L, 2L,
2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L,
1L, 2L, 2L, 1L, 2L, 2L, 2L, 1L, 1L, 2L, 2L), levels = c("0",
"1"), class = "factor"), Chrysemys_present = structure(c(1L,
1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L,
2L, 2L, 2L, 2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L,
2L), levels = c("0", "1"), class = "factor"), urban_percent_2023_500m = c(-0.969742561719032,
-0.614368896225784, -0.561960459836506, -1.08241897426301, -0.958305252669325,
-0.882140705481457, -0.398730625289142, -0.412171084097736, -0.521958411757194,
1.13904289232575, -0.923435599096305, 0.88617603233421, -0.0529401814644404,
-0.303923239336219, 1.15264545027027, -1.0168973175224, 0.981094915798906,
1.94259731493199, -0.465912355297317, 0.884019313111931, -1.13846503050023,
-0.501578027387552, 0.761456544435323, 2.28219290951455, -0.689483768090551,
2.03404429383584, -0.464171141440133, 0.218341471324137, -0.953800010013493,
0.136445123262079, -1.22508166293566, 1.31882364835239, -0.192327342690211,
0.592932737616315), forest_percent_2023_500m = c(1.89411988963412,
-0.786652867191391, 0.562610558234537, 1.1783690039086, -0.0226232839207373,
-0.00607577651606223, 0.737291780476629, -0.893251563484275,
-0.436829851717775, -0.890481381943574, 0.587444687013665, -1.04719621818673,
0.424620997830237, 0.0897363697825507, -0.0494370648196247, 0.413919534898465,
-0.92039247204009, -0.909702597986621, 1.14347273198409, -0.898988205948345,
-0.541518666619878, 0.460502845513551, -0.869008512376215, -1.29844209144976,
0.233211682890451, -0.600962224939457, -0.43929957466133, -0.526918387485172,
2.54805625793507, -0.822396406897255, 2.43419507895804, -0.0611648985577873,
0.657477617957097, -1.34368699027501), min_dist_at_site_m = c(-0.295579037282997,
-0.406168740319293, -0.343210284897073, -0.253317324110564, 0.641800055792079,
1.51151668973138, -0.443887345591638, -0.409370993417729, -0.443887345591638,
-0.229694856031288, -0.360065411646804, 3.12993883706238, -0.443887345591638,
-0.443887345591638, -0.20316525015156, -0.366504625495844, 0.217965039546236,
-0.390635541727046, -0.0332391639833308, 4.09085344956443, -0.443887345591638,
-0.419384931106703, -0.431353535904455, -0.408872255087999, -0.391298796897592,
-0.382538497711036, -0.00435689255584056, -0.180163140796787,
-0.428768504246683, -0.419274900127415, -0.443887345591638, -0.172814345147779,
-0.42123687211955, 0.0222639026186883), Open_to_Public = structure(c(2L,
1L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L,
1L, 1L, 1L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L,
2L), levels = c("0", "1"), class = "factor")), row.names = c(NA,
-34L), class = "data.frame"), obsToY = structure(c(1, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1), dim = c(10L, 10L)))
> summary(umf)
unmarkedFrame Object

34 sites
Maximum number of observations per site: 10
Mean number of observations per site: 5.15
Sites with at least one detection: 16

Tabulation of y observations:
   0    1 <NA>
 138   37  165

Site-level covariates:
  avg_depth_m       avg_veg_percent   Trachemys_present Chrysemys_present urban_percent_2023_500m
 Min.   :-1.26323   Min.   :-1.1304   0:13              0:14              Min.   :-1.2251        
 1st Qu.:-0.48890   1st Qu.:-0.7255   1:21              1:20              1st Qu.:-0.8340        
 Median :-0.05965   Median :-0.3020                                       Median :-0.4055        
 Mean   : 0.00000   Mean   : 0.0000                                       Mean   : 0.0000        
 3rd Qu.: 0.18414   3rd Qu.: 0.4832                                       3rd Qu.: 0.8534        
 Max.   : 4.65871   Max.   : 2.8222                                       Max.   : 2.2822        
 forest_percent_2023_500m min_dist_at_site_m Open_to_Public
 Min.   :-1.3437          Min.   :-0.4439    0:19          
 1st Qu.:-0.8574          1st Qu.:-0.4208    1:15          
 Median :-0.0553          Median :-0.3745                  
 Mean   : 0.0000          Mean   : 0.0000                  
 3rd Qu.: 0.5371          3rd Qu.:-0.1747                  
 Max.   : 2.5481          Max.   : 4.0909                  

Observation-level covariates:
 max_air_temp_C     max_percent_RH    min_percent_RH         doy        
 Min.   :-2.65930   Min.   :-3.4601   Min.   :-2.0685   Min.   :-1.5697  
 1st Qu.:-0.64352   1st Qu.:-0.3339   1st Qu.:-0.6851   1st Qu.:-0.8180  
 Median : 0.07338   Median : 0.4677   Median :-0.1134   Median : 0.1216  
 Mean   : 0.00000   Mean   : 0.0000   Mean   : 0.0000   Mean   : 0.0000  
 3rd Qu.: 0.72755   3rd Qu.: 0.6639   3rd Qu.: 0.6060   3rd Qu.: 0.7793  
 Max.   : 2.18245   Max.   : 1.0589   Max.   : 2.9084   Max.   : 1.5874  
 NA's   :165        NA's   :165       NA's   :165       NA's   :165      
>
> covariates_site <- colnames(site_covs)
>
> # Create the formula for detection (constant) and occupancy (using covariates)
> formula <- as.formula(paste("~ 1 ~", paste(covariates_site, collapse = " + ")))
>
> # Print warnings
> options(warn = 1)
>
> # Fit the model using formula
> m_all <- occu(formula, data=umf)
> # m_all <- occu(formula, data=umf, control = list(trace = TRUE))
>
> # Model selection
> model_selection <- dredge(m_all, rank = "AICc")
Fixed terms are "psi(Int)" and "p(Int)"
Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
Warning: Hessian is singular. Try providing starting values or using fewer covariates.
Error in h(simpleError(msg, call)) :
  error in evaluating the argument 'x' in selecting a method for function 'diag': Lapack routine dgesv: system is exactly singular: U[3,3] = 0

Ken Kellner

unread,
Jun 26, 2025, 4:24:44 PMJun 26
to 'Emma Wilson' via unmarked
Hi Emma,

Thanks for sending the data. It looks like the major issue is with the average depth covariate, as a model fit with only that covariate indicates a separation issue (i.e., the huge negative estimate and large SE). The average depth does seem to be higher at sites where the species was detected at least once, but it's not so different I'd expect this much of an issue. There's also a very large outlier in depth (z score > 4), but the issue persists even after removing it. So, I'm afraid I haven't been able to find a good reason for the issue. The small sample size may be part of it. Maybe someone else on the list will see something I missed.

More generally, I think you have too many site covariates (looks like the global model has 8) to realistically handle with only ~30 sites.

Ken

On Thu, Jun 26, 2025 at 09:42:30AM -0700, 'Emma Wilson' via unmarked wrote:
> Hello,
>
> I am using "unmarked" to build occupancy models that includes data for 34
> sites, some of which were surveyed a different number of times (1-4, 1-5,
> and 1-10). 0s represent non-detection, while NAs represent no survey for
> that particular survey occasion. Prior to running the models, all
> continuous variables were standardized and checked for collinearity.
>
> My models are failing to converge unless specific covariates are removed
> (that is, average depth in m, the presence of *Trachemys *species, and the
> presence of *Chrysemys *species). Currently, I am using intercept-only for
> detection.
>
> I receive the following errors when all site-level covariates are run:
>
> *Warning in sqrt(diag(vcov(model, ...))) : NaNs produced*
>
>
> *Warning: Hessian is singular. Try providing starting values or using fewer
> covariates.Error in h(simpleError(msg, call)) : error in evaluating the
> argument 'x' in selecting a method for function 'diag': Lapack routine
> dgesv: system is exactly singular: U[3,3] = 0*
>
> Is there anything about the code structure or data that may be preventing
> model convergence when including variables for avg_depth_m,
> Trachemys_present, and Chrysemys_present?
>
> Please let me know if you have any thoughts as to how to best approach this
> issue. Thank you for your time and assistance!
>
> All the best,
> Emma
>
> *This is the script used:*
> --
> *** Three hierarchical modeling email lists ***
> (1) unmarked (this list): for questions specific to the R package unmarked
> (2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
> (3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
> ---
> You received this message because you are subscribed to the Google Groups "unmarked" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
> To view this discussion visit https://groups.google.com/d/msgid/unmarked/bd03cc64-098a-40b1-948f-94f167282794n%40googlegroups.com.

Luis Santiago

unread,
Jun 26, 2025, 4:31:31 PMJun 26
to unma...@googlegroups.com
Hi Ella,

I didn't run your code, or anything, but was just taking a quick look at your script.
Maybe someone else can confirm this, but I think you might be getting that error because your global model might be two complex (I. E. Have too many variables) for the number of sampling sites you have? There's an argument on dredge() to limit the number of variables allowed in each model, if you have 34 sites, I'd go with 3 max. Have a try and let us know if it works.

Luís 


--

Emma Wilson

unread,
Jun 26, 2025, 4:52:11 PMJun 26
to unmarked
Hello,

Thank you both so much for taking the time to consider my post.

I removed both outliers for both depth and vegetation (missed data points when the data was originally cleaned). Then, if I remove my Trachemys_present variable, the models appear to converge (I no longer receive the error "Hessian is singular"). See the updated code below. However, I do receive the error if Trachemys_present is included with all other variables. When I fit the models, the model with the lowest AICc value gives the warning, "Large or missing SE values. Be very cautious using these results."

Is there a way to address the separation issue of depth, or do you suspect that the only way to solve these problems would be to run with fewer covariates?

Thanks again for all of your assistance!

All the best,
Emma

See code below:

# TEST:
> site_covs <- site_covs %>%
+    select(-Trachemys_present)
>
> # Data Format:
> # dput(obs_covs_list) # Observation covariates
> dput(site_covs) # Site covariates
structure(list(avg_depth_m = c(-0.389498387746285, 0.0409834313133644,
-0.276603874088152, -0.975829706148633, 1.45233429971534, 0.267763075808222,
0.568516406392073, 0.0993581554487836, -0.580847175061033, -0.407375117488776,
0.521367590744229, 1.96785767080828, -0.467867937565256, -0.129819825373165,
0.425290758858056, -1.86187160021001, 0.990186946336943, 0.572074807573043,
-1.4855706753225, 1.33446226059573, -0.934018492272243, -0.885090476033914,
-1.72131475356172, -0.57195117210861, 0.679716443297366, -1.05322493183472,
0.423956358415192, 0.725975658649968, 0.58986681347789, 0.600542017020798,
-0.14672223098277, -1.82006038633362, 2.00344168261797, 0.443972365058145
), avg_veg_percent = c(-1.01740136888724, -0.965785905513251,
-0.362634240763982, 0.690695840428582, -0.447862193391596, -0.18041116256214,
0.100656168391253, -1.15892763942882, -0.839036642631159, -0.283962284492339,
0.668842519242014, 2.18983367382713, -0.86526062805504, -0.703546051274439,
-1.1755777889043, -0.227143649407263, 1.68720728653607, -0.760364686359515,
-0.152842357372932, 0.196810781612151, 0.332301372968871, -0.139730364660992,
1.91011116263906, -0.31018626991622, -1.01915401620045, -0.358263576526669,
-1.1100178253446, 0.603282555682311, -0.528719481781897, 1.51238071704353,
-0.463159518222194, 1.42496743229726, 2.22916965196295, -0.476271510934135

), Chrysemys_present = structure(c(1L, 1L, 2L, 1L, 1L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 1L,
2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L), levels = c("0",
"1"), class = "factor"), urban_percent_2023_500m = c(-0.96974256172531,
-0.61436889605347, -0.561960459872329, -1.08241897426264, -0.958305252675376,
-0.882140705482269, -0.398730625270325, -0.412171084168558, -0.521958411589929,
1.13904289233102, -0.923435599121015, 0.886176032335736, -0.052940181472824,
-0.303923239551309, 1.15264545018644, -1.01689731752145, 0.981094915577794,
1.94259731480216, -0.465912355322655, 0.884019313114863, -1.13846503052991,
-0.501578027492737, 0.761456544530391, 2.28219290963089, -0.689483768155142,
2.03404429384648, -0.464171141314351, 0.218341471443845, -0.953800010026294,
0.136445123393531, -1.22508166294296, 1.31882364836996, -0.192327342739003,
0.592932737726738), forest_percent_2023_500m = c(1.89411988961185,
-0.786652867337189, 0.562610558348043, 1.17836900367902, -0.0226232840212273,
-0.00607577639894511, 0.737291780284911, -0.89325156342949, -0.436829851740641,
-0.890481382120851, 0.587444687128572, -1.04719621800556, 0.424620998004217,
0.0897363698270903, -0.0494370648434187, 0.413919534833904, -0.920392472036028,
-0.909702597976999, 1.14347273211131, -0.898988205858196, -0.541518666443765,
0.460502845714727, -0.869008512525781, -1.29844209145382, 0.23321168269566,
-0.600962224882789, -0.43929957476116, -0.526918387305091, 2.54805625785236,
-0.822396406953772, 2.43419507910021, -0.0611648987063241, 0.65747761789821,
-1.34368699028903), min_dist_at_site_m = c(-0.295579037294054,
-0.406168740309109, -0.343210284897966, -0.253317324077313, 0.641800055519752,
1.51151668989067, -0.443887345580402, -0.409370993406144, -0.443887345580402,
-0.229694856011296, -0.360065411637357, 3.1299388369543, -0.443887345580402,
-0.443887345580402, -0.203165250136327, -0.36650462547338, 0.217965039406724,
-0.39063554174273, -0.0332391639966218, 4.09085344966048, -0.443887345580402,
-0.41938493111986, -0.431353535906906, -0.408872255073332, -0.391298796869729,
-0.382538497680391, -0.0043568925402347, -0.180163140778535,
-0.428768504221682, -0.419274900125707, -0.443887345580402, -0.172814345136862,
-0.421236872131327, 0.0222639026173606), Open_to_Public = structure(c(2L,
    "so.8", "so.9", "so.10"))), obsCovs = structure(list(max_air_temp_C = c(-0.459496712299354,
-0.303742801197613, -1.84373413915882, 0.917750799740554, -1.67138854970143,
NA, NA, NA, NA, NA, -0.580604372905396, -1.41065499347536, 0.111392955475827,
-0.496410528378457, -1.45389713747688, -0.671913332174162, -0.316357548663697,
0.923164964422706, 1.25268445771418, 1.78637527859954, 0.42458921012467,
0.979804315379768, 1.23978059295068, -0.0825096518558178, 0.126540458021561,
0.36369620732363, -0.346016068850925, -1.20236607561396, 0.0347967904920631,
-0.499222720955428, 0.42458921012467, 0.979804315379768, 1.23978059295068,
-0.0825096518558178, 0.126540458021561, 0.36369620732363, -0.346016068850925,
-1.20236607561396, 0.0347967904920631, -0.499222720955428, -0.738044331693233,
-2.48224020089319, -2.65930144149214, -0.542399514658746, 0.489026145062489,
NA, NA, NA, NA, NA, -2.04600706623838, -0.657012649796902, -1.01699468199903,
-2.27848374673982, 1.24299637410761, -0.59794122221004, -0.0395446935829704,
0.364762742040183, NA, NA, 1.56300121982139, 0.43812388086088,
0.904615948156163, -0.254968350406931, 0.0975416030582898, NA,
NA, NA, NA, NA, 0.642582999215529, 0.673637113260399, 0.926960257809128,
-0.266465596976993, 0.0975416030582898, -1.10341730696493, -0.909527952408127,
0.0585421684755924, -1.5426577118147, -0.393964918344342, -0.277835221390312,
-1.04560948325611, -0.447214785848363, -0.634377487219344, -0.699926908431756,
NA, NA, NA, NA, NA, 1.67199811436682, 1.73344665905825, 1.27329705743014,
-0.151493131276271, -0.0184538167948205, 1.64587944670187, 1.95746233235664,
1.05826227628944, 0.220379673116389, -0.393964918344342, 1.56300121982139,
0.803169391080134, -0.301976773104079, 0.699303114909172, 1.66347977107508,
NA, NA, NA, NA, NA, -1.88856710745055, -0.715890957896787, -1.49739733953783,
-2.41645070558071, NA, NA, NA, NA, NA, NA, 0.242927719215629,
-0.551031695217117, 0.100220800649335, -1.16325082944271, NA,
NA, NA, NA, NA, NA, 0.242927719215629, -0.551031695217117, 0.100220800649335,
-1.16325082944271, NA, NA, NA, NA, NA, NA, 0.860576788306387,
-0.562807356837082, -0.301976773104079, 0.641816882058801, NA,
NA, NA, NA, NA, NA, 0.30348154951865, -0.680563973036852, -0.301976773104079,
0.699303114909172, NA, NA, NA, NA, NA, NA, -0.43527518017815,
-1.36355234699546, -0.726518656510459, -0.105504144995962, NA,
NA, NA, NA, NA, NA, -1.04081348320832, -0.845423235716522, -0.570108488939682,
-0.795338939200375, NA, NA, NA, NA, NA, NA, 1.12701364163968,
-0.162434861757914, -0.927617443387166, -0.645874733789406, NA,
NA, NA, NA, NA, NA, 0.824244490124592, 0.968028653759804, 0.290147432699569,
0.239413252106224, NA, NA, NA, NA, NA, NA, 0.872687554367, 1.00335563861972,
0.223114503740654, 0.308396731526677, NA, NA, NA, NA, NA, NA,
-0.302056753511517, 0.508777850580729, 0.658828541973526, 0.802778334039832,
NA, NA, NA, NA, NA, NA, 0.800022958003388, 1.38017681045896,
1.50791230878628, 1.63058008708511, NA, NA, NA, NA, NA, NA, -1.25880727229917,
0.46167520410083, 0.815238709544302, 0.503849923217915, NA, NA,
NA, NA, NA, NA, -1.73112714866271, -0.185986184997864, -0.670657882378036,
-1.40469300741425, NA, NA, NA, NA, NA, NA, -1.19825344199615,
0.143732340361476, 0.3348360520055, 0.170429772685791, NA, NA,
NA, NA, NA, NA, -0.338389051693333, -0.386172432537448, -1.37450363644651,
-0.726355459779921, NA, NA, NA, NA, NA, NA, -0.641158203208417,
1.02690696185969, 0.189598039261216, 1.21667921056247, NA, NA,
NA, NA, NA, NA, -0.665379735329621, 0.838496375940069, 0.558279148535172,
2.18244792244862, NA, NA, NA, NA, NA, NA, 1.2360105361851, 1.40372813369891,
1.78721617944838, 0.676308621769007, NA, NA, NA, NA, NA, NA,
0.279260017397446, 0.449899542480844, 0.144909419955265, 0.446363690367543,
NA, NA, NA, NA, NA, NA, 1.01801674709425, 0.744291082980249,
0.837583019197268, 0.710800361479234, NA, NA, NA, NA, NA, NA,
0.073376994367179, -1.45775763995528, -0.659485727551563, 0.308396731526677,
NA, NA, NA, NA, NA, NA, -0.568493606844783, -1.17514176107584,
0.0555321813434044, 1.05571775858144, NA, NA, NA, NA, NA, NA),
    siteCovs = structure(list(avg_depth_m = c(-0.389498387746285,
    0.0409834313133644, -0.276603874088152, -0.975829706148633,
    1.45233429971534, 0.267763075808222, 0.568516406392073, 0.0993581554487836,
    -0.580847175061033, -0.407375117488776, 0.521367590744229,
    1.96785767080828, -0.467867937565256, -0.129819825373165,
    0.425290758858056, -1.86187160021001, 0.990186946336943,
    0.572074807573043, -1.4855706753225, 1.33446226059573, -0.934018492272243,
    -0.885090476033914, -1.72131475356172, -0.57195117210861,
    0.679716443297366, -1.05322493183472, 0.423956358415192,
    0.725975658649968, 0.58986681347789, 0.600542017020798, -0.14672223098277,
    -1.82006038633362, 2.00344168261797, 0.443972365058145),
        avg_veg_percent = c(-1.01740136888724, -0.965785905513251,
        -0.362634240763982, 0.690695840428582, -0.447862193391596,
        -0.18041116256214, 0.100656168391253, -1.15892763942882,
        -0.839036642631159, -0.283962284492339, 0.668842519242014,
        2.18983367382713, -0.86526062805504, -0.703546051274439,
        -1.1755777889043, -0.227143649407263, 1.68720728653607,
        -0.760364686359515, -0.152842357372932, 0.196810781612151,
        0.332301372968871, -0.139730364660992, 1.91011116263906,
        -0.31018626991622, -1.01915401620045, -0.358263576526669,
        -1.1100178253446, 0.603282555682311, -0.528719481781897,
        1.51238071704353, -0.463159518222194, 1.42496743229726,
        2.22916965196295, -0.476271510934135), Trachemys_present = structure(c(1L,
        1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 2L, 1L,
        1L, 2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 2L,
        2L, 1L, 1L, 2L, 2L), levels = c("0", "1"), class = "factor"),
        Chrysemys_present = structure(c(1L, 1L, 2L, 1L, 1L, 2L,
        2L, 2L, 2L, 2L, 2L, 2L, 1L, 2L, 1L, 1L, 1L, 2L, 2L, 2L,
        2L, 1L, 1L, 2L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L
        ), levels = c("0", "1"), class = "factor"), urban_percent_2023_500m = c(-0.96974256172531,
        -0.61436889605347, -0.561960459872329, -1.08241897426264,
        -0.958305252675376, -0.882140705482269, -0.398730625270325,
        -0.412171084168558, -0.521958411589929, 1.13904289233102,
        -0.923435599121015, 0.886176032335736, -0.052940181472824,
        -0.303923239551309, 1.15264545018644, -1.01689731752145,
        0.981094915577794, 1.94259731480216, -0.465912355322655,
        0.884019313114863, -1.13846503052991, -0.501578027492737,
        0.761456544530391, 2.28219290963089, -0.689483768155142,
        2.03404429384648, -0.464171141314351, 0.218341471443845,
        -0.953800010026294, 0.136445123393531, -1.22508166294296,
        1.31882364836996, -0.192327342739003, 0.592932737726738
        ), forest_percent_2023_500m = c(1.89411988961185, -0.786652867337189,
        0.562610558348043, 1.17836900367902, -0.0226232840212273,
        -0.00607577639894511, 0.737291780284911, -0.89325156342949,
        -0.436829851740641, -0.890481382120851, 0.587444687128572,
        -1.04719621800556, 0.424620998004217, 0.0897363698270903,
        -0.0494370648434187, 0.413919534833904, -0.920392472036028,
        -0.909702597976999, 1.14347273211131, -0.898988205858196,
        -0.541518666443765, 0.460502845714727, -0.869008512525781,
        -1.29844209145382, 0.23321168269566, -0.600962224882789,
        -0.43929957476116, -0.526918387305091, 2.54805625785236,
        -0.822396406953772, 2.43419507910021, -0.0611648987063241,
        0.65747761789821, -1.34368699028903), min_dist_at_site_m = c(-0.295579037294054,
        -0.406168740309109, -0.343210284897966, -0.253317324077313,
        0.641800055519752, 1.51151668989067, -0.443887345580402,
        -0.409370993406144, -0.443887345580402, -0.229694856011296,
        -0.360065411637357, 3.1299388369543, -0.443887345580402,
        -0.443887345580402, -0.203165250136327, -0.36650462547338,
        0.217965039406724, -0.39063554174273, -0.0332391639966218,
        4.09085344966048, -0.443887345580402, -0.41938493111986,
        -0.431353535906906, -0.408872255073332, -0.391298796869729,
        -0.382538497680391, -0.0043568925402347, -0.180163140778535,
        -0.428768504221682, -0.419274900125707, -0.443887345580402,
        -0.172814345136862, -0.421236872131327, 0.0222639026173606

        ), Open_to_Public = structure(c(2L, 1L, 1L, 2L, 1L, 1L,
        2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 1L, 2L, 1L, 1L, 1L,
        1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 2L, 2L, 2L, 1L, 2L
        ), levels = c("0", "1"), class = "factor")), row.names = c(NA,
    -34L), class = "data.frame"), obsToY = structure(c(1, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 1), dim = c(10L, 10L)))
> summary(umf)
unmarkedFrame Object

34 sites
Maximum number of observations per site: 10
Mean number of observations per site: 5.15
Sites with at least one detection: 16

Tabulation of y observations:
   0    1 <NA>
 138   37  165

Site-level covariates:
  avg_depth_m       avg_veg_percent   Trachemys_present Chrysemys_present urban_percent_2023_500m
 Min.   :-1.86187   Min.   :-1.1756   0:13              0:14              Min.   :-1.2251        
 1st Qu.:-0.57862   1st Qu.:-0.7462   1:21              1:20              1st Qu.:-0.8340        
 Median : 0.07017   Median :-0.2971                                       Median :-0.4055        

 Mean   : 0.00000   Mean   : 0.0000                                       Mean   : 0.0000        
 3rd Qu.: 0.58542   3rd Qu.: 0.5355                                       3rd Qu.: 0.8534        
 Max.   : 2.00344   Max.   : 2.2292                                       Max.   : 2.2822        

 forest_percent_2023_500m min_dist_at_site_m Open_to_Public
 Min.   :-1.3437          Min.   :-0.4439    0:19          
 1st Qu.:-0.8574          1st Qu.:-0.4208    1:15          
 Median :-0.0553          Median :-0.3745                  
 Mean   : 0.0000          Mean   : 0.0000                  
 3rd Qu.: 0.5371          3rd Qu.:-0.1747                  
 Max.   : 2.5481          Max.   : 4.0909                  

Observation-level covariates:
 max_air_temp_C     max_percent_RH    min_percent_RH         doy        
 Min.   :-2.65930   Min.   :-3.4601   Min.   :-2.0685   Min.   :-1.5697  
 1st Qu.:-0.64352   1st Qu.:-0.3339   1st Qu.:-0.6851   1st Qu.:-0.8180  
 Median : 0.07338   Median : 0.4677   Median :-0.1134   Median : 0.1216  
 Mean   : 0.00000   Mean   : 0.0000   Mean   : 0.0000   Mean   : 0.0000  
 3rd Qu.: 0.72755   3rd Qu.: 0.6639   3rd Qu.: 0.6060   3rd Qu.: 0.7793  
 Max.   : 2.18245   Max.   : 1.0589   Max.   : 2.9084   Max.   : 1.5874  
 NA's   :165        NA's   :165       NA's   :165       NA's   :165      
>
> covariates_site <- colnames(site_covs)
> boxplot(site_covs)

>
> # Create the formula for detection (constant) and occupancy (using covariates)
> formula <- as.formula(paste("~ 1 ~", paste(covariates_site, collapse = " + ")))
>
> # Print warnings
> options(warn = 1)
>
> # Fit the model using formula
> m_all <- occu(formula, data=umf, control = list(maxit = 1000))
> # m_all <- occu(formula, data=umf, control = list(trace = TRUE, maxit = 1000))

>
> # Model selection
> model_selection <- dredge(m_all, rank = "AICc")
Fixed terms are "psi(Int)" and "p(Int)"
Warning in sqrt(diag(vcov(model, ...))) : NaNs produced
>
> print(model_selection) # See models
Global model call: occu(formula = formula, data = umf, control = list(maxit = 1000))
---
Model selection table
    psi(Int) psi(avg_dpt_m) psi(avg_veg_prc) psi(Chr_prs) psi(frs_prc_2023_500) psi(min_dst_at_sit_m)
98   34.1400        -63.710                                                                          
42   36.2300        -68.670                                            -8.01800                      
36   49.1500        -93.160        -10.32000                                                        
10  101.3000       -255.000                                           -54.48000                      
34   13.9500        -24.110                                                                          
8   -19.8000        -76.130        -39.57000            +                                            
14   20.8800        -63.610                             +              -9.91000                      
66   41.4300        -79.560                                                                          
70   13.5800        -63.880                             +                                            
40   13.6900        -51.040        -14.19000            +                                            
58   68.9000       -122.900                                           -13.35000                9.8110
52   80.5600       -168.200        -19.39000                                                 -19.5800
114  40.2900        -72.670                                                                    7.8340
46   48.6800        -97.360                             +             -11.10000                      
106  32.7800        -62.260                                            -3.34100                      
100  24.7600        -50.730         -5.65900                                                        
102  29.1300        -67.320                             +                                            
44   26.7600        -53.090         -5.45500                           -5.01000                      
74   75.0500       -193.600                                           -39.57000                      
68   73.8400       -335.300       -143.10000                                                        
24  -68.0700       -176.800       -118.10000            +                                      8.4070
2     5.8830        -12.910                                                                          
72   32.3900       -399.100        -84.14000            +                                            
26   53.8400       -141.000                                           -29.91000               -7.0860
12   61.1100       -153.400          0.03821                          -32.58000                      
38    8.3200        -19.750                             +                                            
50   13.7900        -24.510                                                                   -1.1950
4    10.6100        -39.110        -15.25000                                                        
6     3.8380        -15.870                             +                                            
18    5.0860        -11.000                                                                    0.9195
82   31.8900        -57.290                                                                    7.7730
16    0.6788        -54.890        -13.22000            +              -3.25200                      
86   20.4600        -79.240                             +                                      8.4740
30   19.0100        -61.810                             +              -9.46200               -3.7580
78   13.1800        -52.420                             +              -4.67400                      
84   -1.8900        -62.790        -40.63000                                                  17.4000
90   68.1700       -180.400                                           -37.59000               -8.3700
76   74.1500       -190.700          2.14900                          -37.62000                      
28   57.8500       -152.500         -0.61830                          -32.43000               -7.6410
48    4.3200        -53.680        -20.45000            +               3.99700                      
108  25.9100        -58.110         -9.20700                           -1.33600                      
56   10.4300        -44.050        -11.48000            +                                     -1.6360
104  13.0700        -41.730         -8.57800            +                                            
118  28.2800        -66.240                             +                                      7.7800
116  24.7900        -51.690         -6.11900                                                  -0.5752
60   27.4300        -55.910         -5.25200                           -5.58600               -3.4430
122  29.3400        -55.220                                            -3.12400                2.1200
110  27.8200        -52.930                             +              -3.51300                      
62   35.9200        -65.600                             +              -8.68700               -5.0400
88  -14.5200       -153.100        -50.19000            +                                     13.9600
80    6.4300       -115.800        -19.94000            +               8.21500                      
54    8.2090        -20.110                             +                                     -0.6885
20    2.5490         -9.128         -3.13800                                                   1.2250
22    3.9080        -16.350                             +                                     -0.1771
94   15.0300        -60.350                             +              -3.27900                6.9160
92    4.0470        -43.890        -25.47000                            6.49400               12.1100
32    3.0210        -44.580         -8.03500            +              -3.08300               -0.9544
112   7.0680        -39.380        -12.83000            +               3.71900                      
120  12.5600        -45.930        -11.09000            +                                     -0.1932
124  28.5000        -54.340         -5.22600                           -2.02800               -0.0682
96   -3.5920       -131.100        -33.70000            +               9.32300                3.9440
64    7.7530        -37.620        -12.52000            +               2.67700                3.8330
126  27.0300        -57.600                             +              -1.87100                4.5660
128   9.9870        -37.400        -10.88000            +               3.69500                4.5130
3     0.3715                        -0.75670                                                        
1     0.3470                                                                                        
15   40.4900                       -20.76000            +             -15.76000                      
103 104.3000                       -29.36000            +                                            
17    0.3103                                                                                  -0.7043
119 279.6000                       -80.85000            +                                    -26.3000
19    0.3465                        -0.69740                                                  -0.6135
    psi(Opn_to_Pbl) psi(urb_prc_2023_500)  p(Int) df  logLik  AICc delta weight
98                +              5.742000 -0.8081  5 -74.158 160.5  0.00  0.089
42                +                       -0.8081  5 -74.168 160.5  0.02  0.088
36                +                       -0.8080  5 -74.177 160.5  0.04  0.087
10                                        -0.8551  4 -75.595 160.6  0.11  0.084
34                +                       -0.8330  4 -76.012 161.4  0.94  0.055
8                                         -0.8163  5 -74.989 162.1  1.66  0.039
14                                        -0.8551  5 -75.587 163.3  2.86  0.021
66                               6.094000 -0.9001  4 -76.983 163.3  2.89  0.021
70                               6.048000 -0.8552  5 -75.608 163.4  2.90  0.021
40                +                       -0.8079  6 -74.133 163.4  2.92  0.021
58                +                       -0.8080  6 -74.134 163.4  2.92  0.021
52                +                       -0.8079  6 -74.134 163.4  2.92  0.021
114               +              6.093000 -0.8080  6 -74.139 163.4  2.93  0.021
46                +                       -0.8080  6 -74.140 163.4  2.93  0.021
106               +              4.966000 -0.8075  6 -74.140 163.4  2.93  0.021
100               +              3.225000 -0.8081  6 -74.141 163.4  2.93  0.021
102               +              6.824000 -0.8080  6 -74.147 163.4  2.94  0.020
44                +                       -0.8082  6 -74.147 163.4  2.95  0.020
74                               1.812000 -0.8554  5 -75.635 163.4  2.95  0.020
68                               6.710000 -0.8556  5 -75.657 163.5  3.00  0.020
24                                        -0.8085  6 -74.182 163.5  3.01  0.020
2                                         -0.8412  3 -78.342 163.5  3.02  0.020
72                              25.690000 -0.8083  6 -74.189 163.5  3.03  0.020
26                                        -0.8568  5 -75.689 163.5  3.06  0.019
12                                        -0.8560  5 -75.708 163.6  3.10  0.019
38                +                       -0.8349  5 -75.873 163.9  3.43  0.016
50                +                       -0.8335  5 -76.003 164.1  3.69  0.014
4                                         -0.8747  4 -77.412 164.2  3.74  0.014
6                                         -0.8385  4 -77.537 164.5  3.99  0.012
18                                        -0.8394  4 -78.288 166.0  5.50  0.006
82                               5.589000 -0.9001  5 -76.984 166.1  5.65  0.005
16                                        -0.8549  6 -75.580 166.3  5.81  0.005
86                               6.679000 -0.8550  6 -75.580 166.3  5.81  0.005
30                                        -0.8551  6 -75.587 166.3  5.83  0.005
78                               2.700000 -0.8552  6 -75.590 166.3  5.83  0.005
84                               9.697000 -0.8551  6 -75.596 166.3  5.84  0.005
90                               0.971200 -0.8550  6 -75.614 166.3  5.88  0.005
76                               3.407000 -0.8552  6 -75.619 166.3  5.89  0.005
28                                        -0.8556  6 -75.654 166.4  5.96  0.005
48                +                       -0.8080  7 -74.132 166.6  6.11  0.004
108               +              3.453000 -0.8080  7 -74.134 166.6  6.12  0.004
56                +                       -0.8079  7 -74.135 166.6  6.12  0.004
104               +              1.524000 -0.8080  7 -74.136 166.6  6.12  0.004
118               +              6.200000 -0.8080  7 -74.138 166.6  6.12  0.004
116               +              3.108000 -0.8085  7 -74.140 166.6  6.13  0.004
60                +                       -0.8080  7 -74.142 166.6  6.13  0.004
122               +              3.847000 -0.8081  7 -74.144 166.6  6.14  0.004
110               +              3.152000 -0.8078  7 -74.148 166.6  6.14  0.004
62                +                       -0.8082  7 -74.153 166.6  6.15  0.004
88                              15.290000 -0.8077  7 -74.153 166.6  6.15  0.004
80                              11.110000 -0.8084  7 -74.162 166.6  6.17  0.004
54                +                       -0.8358  6 -75.869 166.8  6.39  0.004
20                                        -0.8540  5 -77.518 167.2  6.72  0.003
22                                        -0.8385  5 -77.536 167.2  6.75  0.003
94                               4.474000 -0.8550  7 -75.581 169.5  9.01  0.001
92                               9.665000 -0.8551  7 -75.586 169.5  9.02  0.001
32                                        -0.8550  7 -75.586 169.5  9.02  0.001
112               +              2.894000 -0.8080  8 -74.133 170.0  9.57  0.001
120               +              1.220000 -0.8080  8 -74.134 170.0  9.57  0.001
124               +              3.562000 -0.8083  8 -74.136 170.0  9.57  0.001
96                              12.420000 -0.8081  8 -74.139 170.0  9.58  0.001
64                +                       -0.8087  8 -74.143 170.0  9.59  0.001
126               +              4.393000 -0.8078  8 -74.144 170.0  9.59  0.001
128               +              2.903000 -0.8082  9 -74.135 173.8 13.31  0.000
3                                         -0.7546  3 -84.787 176.4 15.91  0.000
1                                         -0.7504  2 -86.045 176.5 16.02  0.000
15                                        -1.0710  5 -82.357 176.9 16.40  0.000
103               +              9.888000 -1.0240  6 -80.906 176.9 16.46  0.000
17                                        -0.7482  3 -85.092 177.0 16.52  0.000
119               +             45.040000 -0.9843  7 -79.601 177.5 17.05  0.000
19                                        -0.7583  4 -84.169 177.7 17.26  0.000
 [ reached 'max' / getOption("max.print") -- omitted 57 rows ]
Models ranked by AICc(x)
>
> # Extract all models from dredge output
> all_models <- get.models(model_selection, subset = TRUE)  # list of models
>
> best_model <- all_models[[1]]
> summary(best_model)

Call:
occu(formula = ~1 ~ avg_depth_m + Open_to_Public + urban_percent_2023_500m +
    1, data = umf, control = list(maxit = 1000))

Occupancy (logit-scale):
                        Estimate   SE      z P(>|z|)
(Intercept)                34.14 44.9  0.761   0.447
avg_depth_m               -63.71 82.6 -0.771   0.441
Open_to_Public1           -19.13 32.1 -0.596   0.551
urban_percent_2023_500m     5.74 15.6  0.367   0.713

Detection (logit-scale):
 Estimate    SE     z  P(>|z|)
   -0.808 0.198 -4.09 4.36e-05

AIC: 158.3169
Number of sites: 34Warning: Large or missing SE values. Be very cautious using these results.


>
> # Function to check convergence of a fitted unmarkedFitOccu model:
> check_convergence <- function(model) {
+   # 'model@opt$convergence' holds convergence info: 0 = converged, anything else = no
+   return(model@opt$convergence == 0)
+ }
>
> # Apply convergence check to all models
> convergence_status <- sapply(all_models, check_convergence)
>
> # Show which models converged
> converged_models <- which(convergence_status)
> non_converged_models <- which(!convergence_status)
>
> cat("Number of converged models:", length(converged_models), "\n")
Number of converged models: 128
> cat("Number of non-converged models:", length(non_converged_models), "\n")
Number of non-converged models: 0
>
> # Print the model formulas of non-converged models
> cat("\nNon-converged models formulas:\n")

Non-converged models formulas:
> lapply(all_models[non_converged_models], function(m) print(m@call$formula))
named list()

Luis Santiago

unread,
Jun 26, 2025, 4:59:06 PMJun 26
to unma...@googlegroups.com
No worries Ella.
I don't know if Ken agrees, but yes, my take is that you should use fewer covariates. The occasions when I have encountered that error, myself, had to do with model overparameterisation.

Luís 

Emma Wilson

unread,
Jun 26, 2025, 5:06:09 PMJun 26
to unmarked
Hello,

I'll definitely give it a shot! Unfortunately, even when I use models that have fewer variables (for example, ~1 ~avg_depth_m + avg_veg_percent),  I still get warning messages. I suspect that depth is a crucial factor in occupancy for the species, so hopefully someone might have some ideas on what about the depth covariate may be driving separation.

Thanks again!

All the best,
Emma 

Luis Santiago

unread,
Jun 26, 2025, 5:09:02 PMJun 26
to unma...@googlegroups.com
Can you post a screenshot of the variable distribution?

Emma Wilson

unread,
Jun 26, 2025, 5:10:12 PMJun 26
to unmarked
Is this helpful?

boxplot of site covariates.jpeg

Jim Baldwin

unread,
Jun 27, 2025, 12:28:10 AMJun 27
to unma...@googlegroups.com
One can get your model to converge but doesn't really fix the underlying issue which is that the model is too complicated for the available data (as mentioned by others.)

First, to get occu to converge, pick "better" starting values (although it's difficult to give general advice about picking better starting values).

(fm2 <- occu(~ 1 ~ avg_depth_m + avg_veg_percent + Trachemys_present +
    Chrysemys_present + urban_percent_2023_500m + forest_percent_2023_500m +
    min_dist_at_site_m + Open_to_Public, umf,
    starts=c(-39.8253, -182.467, -17.1697, -92.5466, 138.132, 4.59815,
    -0.0776043, -51.6599, -15.3034, -0.70657)))

Call:
occu(formula = ~1 ~ avg_depth_m + avg_veg_percent + Trachemys_present +
    Chrysemys_present + urban_percent_2023_500m + forest_percent_2023_500m +
    min_dist_at_site_m + Open_to_Public, data = umf, starts = c(-39.8253,
    -182.467, -17.1697, -92.5466, 138.132, 4.59815, -0.0776043,
    -51.6599, -15.3034, -0.70657))

Occupancy (logit-scale):
                          Estimate    SE         z P(>|z|)
(Intercept)               -39.8253  8028 -4.96e-03   0.996
avg_depth_m              -182.4670 51861 -3.52e-03   0.997
avg_veg_percent           -17.1697 18125 -9.47e-04   0.999
Trachemys_present1        -92.5466  4898 -1.89e-02   0.985
Chrysemys_present1        138.1320 19924  6.93e-03   0.994
urban_percent_2023_500m     4.5982 25739  1.79e-04   1.000
forest_percent_2023_500m   -0.0776 19974 -3.89e-06   1.000
min_dist_at_site_m        -51.6599 56799 -9.10e-04   0.999
Open_to_Public1           -15.3034  8402 -1.82e-03   0.999

Detection (logit-scale):
 Estimate    SE     z  P(>|z|)
   -0.707 0.201 -3.52 0.000436

AIC: 162.1126
Number of sites: 34

Warning message:
Large or missing SE values. Be very cautious using these results.
 
I obtained "better" starting values by using a crude approximation of occu written for Mathematica (where I have more control over the precision of the calculations). Then I plugged those results into the code above.  Again, "better" means that convergence is obtained rather than necessarily obtaining a desirable fit. The full model (and apparently several submodels) are overparameterized such that there are an infinite number of solutions that will get you the same predictions. Also note that one obtains NaN's for the standard errors when the estimated covariance matrix has negative variance (i.e., any negative values along the diagonal).  The AIC value is just slightly smaller than the 

The overparameterization can be detected (or at least, strongly indicated) by looking at the estimate of the parameter correlation matrix and observing that there are several off-diagonal entries very close to +1 and/or -1 (and because of internal round-off error there are a some entries that are a bit larger than +1 and some less than -1).  Here is that correlation matrix rounded to 4 decimal places and only the 9 site covariates (8 + intercept).  (All parameter estimators have essentially zero correlation with the detection probability in your model.)

   covmat <- vcov(fm2)
  cormat <- matrix(rep(1, 100), nrow=10, ncol=10)
  for (i in 1:9) {
  for (j in (i+1):10) {
      cormat[i, j] <- covmat[i, j]/sqrt(covmat[i, i]*covmat[j, j])
      cormat[j, i] <- cormat[i, j]
  }}
  cormat <- matrix(as.numeric(formatC(cormat, format = "f", digits = 4)), nrow = nrow(cormat))
  print(cormat[1:9, 1:9])

         [,1]    [,2]    [,3]    [,4]    [,5]    [,6]    [,7]    [,8]    [,9]
 [1,]  1.0000 -0.7163  0.4810 -1.5772  0.9266  0.5976  0.6257  0.6907 -0.8580
 [2,] -0.7163  1.0000 -0.9656  0.1729 -0.9863 -0.9997 -1.0111 -1.0242  0.5746
 [3,]  0.4810 -0.9656  1.0000 -0.0878  0.9200  0.9788  0.9537  0.8977 -0.3529
 [4,] -1.5772  0.1729 -0.0878  1.0000 -0.2425 -0.2317 -0.3235 -0.5367  0.9763
 [5,]  0.9266 -0.9863  0.9200 -0.2425  1.0000  0.9903  1.0297  1.0935 -0.7568
 [6,]  0.5976 -0.9997  0.9788 -0.2317  0.9903  1.0000  0.9926  0.9626 -0.4998
 [7,]  0.6257 -1.0111  0.9537 -0.3235  1.0297  0.9926  1.0000  0.9816 -0.5828
 [8,]  0.6907 -1.0242  0.8977 -0.5367  1.0935  0.9626  0.9816  1.0000 -0.6650
 [9,] -0.8580  0.5746 -0.3529  0.9763 -0.7568 -0.4998 -0.5828 -0.6650  1.0000


I wish I had better news.

Jim


Marc Kery

unread,
Jun 27, 2025, 4:33:27 AMJun 27
to unmarked
Dear Emma,

funny in the other email thread active on this list right now, there is a discussion about how complex an occupancy model ought to be at the max. There, Rory reminds us of some rules of thumb in use in regression modeling, that for each estimated parameter one ought to have 10 or even 20 data points. These are only rules of thumb, but arguably we ought to keep them in mind when fitting models with unmarked. So, accordingly, with 34 sites, you ought to perhaps fit not more than 1-3 parameters.

Best regards --- Marc





From: 'Emma Wilson' via unmarked <unma...@googlegroups.com>
Sent: Thursday, June 26, 2025 23:10
To: unmarked <unma...@googlegroups.com>
Subject: Re: [unmarked] Models Failing to Converge
 
--

*** Three hierarchical modeling email lists ***
(1) unmarked (this list): for questions specific to the R package unmarked
(2) SCR: for design and Bayesian or non-bayesian analysis of spatial capture-recapture
(3) HMecology: for everything else, especially material covered in the books by Royle & Dorazio (2008), Kéry & Schaub (2012), Kéry & Royle (2016, 2021) and Schaub & Kéry (2022)
---
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.

Emma Wilson

unread,
Jun 27, 2025, 11:43:52 AMJun 27
to unmarked
Hi, all!

Thanks so much for your detailed responses! I'm just getting my foot into the door with model building, so this has been a really valuable conversation!

When minimizing the covariates used to avoid overparameterization, can the global model still contain more covariates that are used build less complex submodels, or does the global model also need to be limited until we receive reasonable SE values? If the latter, is there a recommended approach to still incorporate all variables into multiple "global" models where the resulting submodels could then still be ranked via AICc?

Thanks for all of your feedback!

All the best,
Emma

Luis Santiago

unread,
Jun 27, 2025, 7:00:30 PMJun 27
to unma...@googlegroups.com
If I understood you correctly, Emma, your global model can have all the variables you used. What you can do is limit the max number of variables used in each model combination when you use dredge(). In this case, on the follow-up of what was said before, given your data, I would go for 3 max.

Luís 

Jim Baldwin

unread,
Jun 30, 2025, 12:57:43 AMJun 30
to unma...@googlegroups.com
The suggestions from others concerned limiting the number of predictors in the model to 1 to 3 (which is really 2 to 4 if one counts the intercept). 

The top 2-variable model with respect to AIC has average depth and Open to Public.  Unfortunately, when one plots the 95% confidence intervals for the probability of occupancy, those essentially go from 0 to 1 which isn't much use.  Below is a figure created from the attached code.The darker gray area shows the 95% confidence band.

image.png

image.png
In short while occu gives the warning "Large or missing SE values. Be very cautious using these results", the function is producing the correct results (meaning the maximum likelihood estimates are correctly found). 

The data is certainly suggestive that average depth is the most important variable of the ones you've considered but 95% confidence intervals are just too wide to be useful to convince others.. Here's a jittered strip plot illustrating what Ken Kellner mentioned about the average depth covariate:

image.png


I'm not a wildlife biologist but I wonder if there might be some other function of average depth that is more predictive.  I wonder if below some threshold depth the occupancy probability is constant (and well below 1) but above that threshold the occupancy probability declines rapidly.  Such transformations would (or at least should) need to have some biological justification.

Jim

occu example with 2 predictors.r

Jim Baldwin

unread,
Jun 30, 2025, 1:04:11 AMJun 30
to unma...@googlegroups.com
Sorry, don't know why the images don't appear.  I will try this again...

The suggestions from others concerned limiting the number of predictors in the model to 1 to 3 (which is really 2 to 4 if one counts the intercept). 

The top 2-variable model with respect to AIC has average depth and Open to Public.  Unfortunately, when one plots the 95% confidence intervals for the probability of occupancy, those essentially go from 0 to 1 which isn't much use.  Below is a figure created from the attached code.The darker gray area shows the 95% confidence band.
image.png
image.png
In short while occu gives the warning "Large or missing SE values. Be very cautious using these results", the function is producing the correct results (meaning the maximum likelihood estimates are correctly found). 

The data is certainly suggestive that average depth is the most important variable of the ones you've considered but 95% confidence intervals are just too wide to be useful to convince others.. Here's a jittered strip plot illustrating what Ken Kellner mentioned about the average depth covariate:
image.png

I'm not a wildlife biologist but I wonder if there might be some other function of average depth that is more predictive.  I wonder if below some threshold depth the occupancy probability is constant (and well below 1) but above that threshold the occupancy probability declines rapidly.  Such transformations would (or at least should) need to have some biological justification.

Jim
Reply all
Reply to author
Forward
0 new messages