distance rasters for rsf.fit()

59 views
Skip to first unread message

Odd Jacobson

unread,
Apr 30, 2024, 7:51:47 AMApr 30
to ctmm R user group
Hi Chris,

I am trying to use rsf.fit() in an unconventional way. Given a pair of neighboring capuchin groups that have overlapping home ranges, I want to understand whether one of those groups is driving the overlap more than the other (e.g., the dominant group). The idea is to fit RSFs to rasters of “distance to neighboring group’s mode UD location.” I was thinking this might provide an estimate of “push toward” (negative coefficient) or “pull away” (positive coefficient) from the neighboring home range (or core area). However, when I conduct this analysis, the parameter estimates from rsf.fit() are extremely small (basically 0). I am wondering if I am missing some crucial preprocessing steps when making the rasters or if I need to adjust the resolution of the rasters, or something else. My specific questions are:

1) Are the estimates from rsf.fit() sensitive to the resolution of the raster?
2) Are there pre-processing steps (e.g., transformations, reclassifications) that you would recommend before plugging a raster of distances into rsf.fit()? I would expect that because the ranges overlap, the selection coefficient should not be 0 in all cases. I wonder if scaling the raster values in some way is important to do first, but I am very new to raster data and RSFs (never used conventional RSFs) so this is uncharted territory for me. 
3) Am I correct that a negative coefficient would indicate selection for areas closer to the neighbor’s mode location?

I am sure the ctmm team is super busy, but I was wondering if there are any plans for creating a vignette for the RSF stuff? As you can probably tell, I am a bit confused what the recommended workflow is (aside from plugging in the UDs and DATA). 

Thank you!

All the best,
Odd

Christen Fleming

unread,
May 1, 2024, 12:22:39 AMMay 1
to ctmm R user group
Hi Odd,

I would use the UD PDFs instead of distance to mode. This will be a built-in option at some point. Distance to a specific point would probably be hard to tease apart from the estimated mean location (i.e., that effect is already built-in to the model, to an extent).

Covariate resolution can be too coarse if there are few pixels within the home-range area.

Negative selection of distance to something would select for low distances, which would be attraction.

An RSF vignette is forthcoming.

Best,
Chris

Odd Jacobson

unread,
May 1, 2024, 9:57:58 AMMay 1
to ctmm R user group
Hi Chris,

Thank you for your guidance. I tried running a few RSFs using the UD PDF of the neighboring group as you suggested. However, the confidence intervals in all outputs are very wide and symmetrically centered around zero. Do you have any idea what might be causing this? Attached is a plot illustrating an example, showing the raster used in rsf.fit() alongside the DATA and UD (95% contour). Based on the plot, I would anticipate a positive selection coefficient, which is validated by the mean estimate in the output. However, I am puzzled by the wide confidence intervals.

The output from summary() for this example was:

> summary(RSFp_id1[[3]])
$name
[1] "OUF anisotropic"

$DOF
     mean      area diffusion     speed
 42.06961  39.63841  66.41410 119.55100

$CI
                                  low       est        high
pdf (1/pdf)              -5135.732962  0.197562 5136.128087
area (square kilometers)     1.587313  2.225531    2.969912
τ[position] (hours)          6.541962  9.922600   15.050224
τ[velocity] (minutes)       24.660219 30.033541   36.577681
speed (kilometers/day)       4.907612  5.390721    5.873269
diffusion (hectares/day)    39.947615 51.607841   64.738457

The code I use for rsf.fit() looks like this:
for (i in 1:5){
rsf_id1 <- rsf.fit(DATA_id1[[i]],
                     UD = UD_id1[[i]],
                     R = list(pdf = rast_pdf_id1[[i]]),
                     integrator = "Riemann",
                     trace = 2)
}

I also tried using rasters of "distance to the centroid of the intersection area between neighboring home ranges" and I get more sensible results/confidence intervals.  Could there be any drawbacks to this approach? I am not exactly sure what you mean by "distance to a specific point would probably be hard to tease apart from the estimated mean location" but that makes me think this approach may be problematic.

I appreciate all your help.

Best,
Odd
pdf_raster_example.png

Christen Fleming

unread,
May 8, 2024, 11:16:24 PMMay 8
to ctmm R user group
Hi Odd,

Wide confidence intervals generally corresponds to model features that can't be supported by model selection.
I think adding any square-distance (from a point) term can only increase AIC, because there are already linear and quadric location terms in the iRSF. For that reason, I'd be surprised if adding a linear-distance term would increase AIC. But you can always check.

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