rsf.fit error messages

90 views
Skip to first unread message

lisa king

unread,
Apr 30, 2024, 1:29:25 AMApr 30
to ctmm R user group
Hi all,

I'd like to determine if there is preference for either disturbed or undisturbed parts of my study area, however I'm running into some error messages with rsf.fit.

The raster has 2 categories, Disturbed and Not Disturbed and there are 109 locations in Disturbed and 198 locations in Not Disturbed. 

Do I have too few locations to expect rsf.fit to converge?

With the Riemann algorithm;
Capture.PNG
Capture.PNG

And with the Monte Carlo algorithm;
Capture.PNG
Capture.PNG

Jesse Alston

unread,
Apr 30, 2024, 5:52:24 PMApr 30
to lisa king, ctmm R user group
Hi Lisa,

What is your effective sample size for this individual?

Jesse

Sent via mobile--I apologize for excess brevity

On Apr 29, 2024, at 10:29 PM, lisa king <king...@gmail.com> wrote:

Hi all,

I'd like to determine if there is preference for either disturbed or undisturbed parts of my study area, however I'm running into some error messages with rsf.fit.

The raster has 2 categories, Disturbed and Not Disturbed and there are 109 locations in Disturbed and 198 locations in Not Disturbed. 

Do I have too few locations to expect rsf.fit to converge?

With the Riemann algorithm;
<Capture.PNG>

<Capture.PNG>


And with the Monte Carlo algorithm;
<Capture.PNG>

<Capture.PNG>

--
You received this message because you are subscribed to the Google Groups "ctmm R user group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ctmm-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctmm-user/55449753-2c4f-46b2-bd78-30e74ccdf1fbn%40googlegroups.com.
<Capture.PNG>
<Capture.PNG>
<Capture.PNG>
<Capture.PNG>

Christen Fleming

unread,
May 1, 2024, 12:42:01 AMMay 1
to ctmm R user group
Hi Lisa,

Those look like warnings and not error messages to me. The first comes from a parameter being near a boundary, which means that you should probably be using rsf.select and not rsf.fit to make sure that your parameters are supported.
The next warning is that you hit the RAM limit, which you can increase with that argument if you can spare it.

Best,
Chris

lisa king

unread,
May 6, 2024, 7:24:59 AMMay 6
to ctmm R user group
Thank you Chris and Jesse,

Your suggestions solved most of my problems, including the one above, so thank you!

However, I'm still getting the boundary/optimizer warning,
as well as very different results (and huge CIs) on subsequent runs of rsf.select.
I've provided examples of both below.

This is an example of the persistent boundary/optimizer warning. 
This individual has 26 locations in Disturbed and 161 locations in Not Disturbed;

Capture.PNG
Capture1.PNG

and this example shows very different results on subsequent runs of rsf.select.
This individual has 26 locations in Disturbed and 370 locations in Not Disturbed;
Capture.PNG
Capture1.PNG
Capture2.PNG

Regards,

Christen Fleming

unread,
May 10, 2024, 11:41:30 PMMay 10
to ctmm R user group
Hi Lisa,

  1. I will double check the optimizer warning code, because it shouldn't trigger under rsf.select().
  2. Those estimates aren't substantially different given the confidence interval widths. That's a relative difference of like 10^-6, which is much smaller than the numerical error target (default of 1%).
  3. I don't think the reference category argument is being recognized correctly by raster, because for two categories there should only be one parameter estimate and, regardless, all parameter estimates should have the reference category in their name. If the raster factor has values 0 and 1, try reference=1 instead of a string.
Best,
Chris

lisa king

unread,
May 13, 2024, 4:42:51 AMMay 13
to ctmm R user group
Thankyou, the optimizer warning code isn't triggered with rsf.select now, I've changed to reference = 1, and I take your point about the difference in estimates.
I'm still getting some confusing results. Any advice would really be appreciated.

This result seems plausible - with 161 points in Not Disturbed and 26 points in Disturbed, the estimated effect of -0.1323995 indicates a decreased probability of finding it in disturbed habitat, although the effect is not significant, 95% CI (-0.7258218,0.4610229).
Capture.PNG

But this result doesn't seem plausible - with 344 points in Not Disturbed and 67 points in Disturbed, the estimated effect of 0.7211929 indicates an increased (and significant) probability of finding it in disturbed habitat.
Capture.PNG

Lastly, this individual has 26 points in Not Disturbed and 1 point in Disturbed, and the rsf results omit the habitat effect.
Presumably this is because there was not enough data to estimate it - would it be possible to receive a warning for these cases?
Capture.PNG

Christen Fleming

unread,
May 16, 2024, 11:23:59 PMMay 16
to ctmm R user group
Hi Lisa,

In the last example, model selection did not support disturbance as a predictor. With verbose=TRUE, that model would still be in the list to look at, as when using ctmm.select() and looking at autocorrelation models that were not selected.
In the first examples, AIC-based model selection did support disturbance as a predictor (ΔAIC<0 is a weaker level of support than a 5% significance level).

Beyond that, I can't tell just from the selection parameters and fraction of disturbed locations if the results make sense. You have to ask what the available locations look like and what fraction of disturbed locations would you get with a null distribution with no selection. There is a paper by Fieberg on making diagnostic plots for RSFs (I do not yet recommend the function in ctmm for that - it needs more work).

Best,
Chris
Reply all
Reply to author
Forward
0 new messages