Interpreting RSF

119 views
Skip to first unread message

Chris MacColl

unread,
Apr 29, 2024, 11:11:15 AMApr 29
to ctmm R user group
Hi Chris and team,

I have successfully ran a test rsf using a single individual named "Bills bore adult male" (n = 1,150 locations) from my dataset. Simply put, I am now trying to understand what I have produced, and if I have produced it correctly. 

Im working with three environmental rasters for now:
  • Distance to water - in metres, resolution = 100m.
  • Fire frequency - number of years area burnt between 2000 - 2022 so you get a number between 0 - 22. Resolution = 250m.
  • Vegetation type - categorical with numbers representing different vegetation types. I set this raster as a factor and used reference = "auto" during rsf.fit(). Resolution = 1000m.
I then aligned the CRS and resolution of the layers to match the distance to water layer which is projected and the finest scale resolution (100m). I used nearest neighbour method for the veg raster given it is categorical, and bilinear method for fire frequecy given it is numeric. Once standardised I was able to use the Riemann integrator which processed the data much faster (regular rsf's would run all night for a single individual). 

This is the code I used to run the rsf:
bills_bore_male_rsf_rieman <- rsf.fit(bills_bore_male_telemetry,
                                      bills_bore_male_akde,
                                      R = be,
                                      integrator = "Riemann",
                                      reference = "auto")

This is the summary output:
$name [1] "OU" $DOF mean area diffusion speed 316.3148 332.4433 541.7034 0.0000 $CI low est dist_to_water (1/dist_to_water) -7.526879e-04 -0.000437899 fire_freq (1/fire_freq) -1.003874e-01 -0.051084414 veg (1/veg) -2.040214e-01 -0.128781838 area (square kilometers) 2.571948e+02 287.246014897 τ[position] (hours) 4.533886e+00 5.145266950 diffusion (square kilometers/day) 1.306275e+02 142.365409308 high dist_to_water (1/dist_to_water) -1.231101e-04 fire_freq (1/fire_freq) -1.781446e-03 veg (1/veg) -5.354228e-02 area (square kilometers) 3.189337e+02 τ[position] (hours) 5.839091e+00 diffusion (square kilometers/day) 1.546010e+02

Questions: 
  • Could you please offer some commentary on the results I have received and what is significant / non-significant or makes sense / needs tweaking?
  • For example, should I convert fire frequency to an actual frequency i.e. proportion of years burnt rather than just a number between 0 - 22? I also have a time since last burn (TSLB) layer which I could use but is also non-relative. 
  • What is the categorical veg layer telling me? All these scores seem to hover around 0 (est), does this mean they are non-significant? I dont understand the scales as are not -1 to 1. Also, by using auto = reference does rsf.fit() know to only treat this layer as categorical given I converted it to a factor?
  • Is what I have done by standardising the CRS and resolution the right thing to do here? Any issues you can see by using a local projected grid? (in this case UTM zone 54S). I have individuals tracked across multiple zones so plan to analyse individually and use mean() to draw comparisons between rsf's. Sound ok?
Once again, thank you for your help working through this process. 
Chris

Jesse Alston

unread,
Apr 30, 2024, 5:52:28 PMApr 30
to Chris MacColl, ctmm R user group
Hi Chris,

This makes more sense. All of these predictors and their corresponding CI limits are negative, so they are significant.

Yes, exactly. Although selection on this sort of data is with respect to the reference category (if you go with this approach, with respect to all the veg types that you did not include in the model), so it is important to choose the reference category wisely for easiest interpretation (in an ideal world, habitat(s) that are collectively relatively often used but with neutral selection).

Jesse

On Mon, Apr 29, 2024 at 12:01 PM Chris MacColl <redgosr...@gmail.com> wrote:
Hi Jesse, thanks for such a prompt response, much appreciated. 

Sorry, the summary results didnt paste over correctly - see screenshot below showing low, est, and high values. 

To subset the veg layer into a series of logical rasters, do you mean like a yes/no or 1/0 structure for each particular vegetation type? For example, I believe Eucalypt woodlands are an important habitat so I would subset the veg layer to be 1 = Eucalypt woodlands and 0 = everything else in order to see if the species selects Eucalypt woodlands more/less often based on its availability?

Thanks again.
Chris. 

image.png






On Mon, Apr 29, 2024 at 12:59 PM Jesse Alston <jmals...@gmail.com> wrote:
Hi Chris,

I don't understand why you are not getting a "high" result in your RSF results--"est" is the point estimate, and "low" and "high" are the bounds of the confidence intervals. You can interpret these just like any other confidence intervals. Also, the variables are standardized under the hood, so betas should be interpreted as effects of 1 SD change in whatever your variable of interest is.

I don't think changing the fire frequency raster would make much difference. It would just change how you interpret the betas.

It looks to me like your veg raster was read by rsf.fit() as numeric. I would recommend making logical rasters from the veg types you are interested in, as this eliminates any possibility of mistakes like this. If you do this, make sure to leave out some layers to serve as your reference point (ideally, some layers that collectively exhibit roughly neutral selection).

In general, it is not great to re-project rasters because it causes data loss, but you may have to do it to get them lined up properly. I think rsf.fit() might do this automatically under the hood, but I can't remember--Chris F will have to weigh in on that.

Jesse

--
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/2f4cbcc3-1f50-455a-8b25-c81de83c686an%40googlegroups.com.


--


--

Chris MacColl, PhD Candidate
School of Earth and Environmental Sciences

The University of Queensland - RARES Group

M: 0427 560 666

E: redgosr...@gmail.com

UQ  I RARES I Google Scholar




--

Chris MacColl

unread,
Apr 30, 2024, 5:52:33 PMApr 30
to Jesse Alston, ctmm R user group
Hi Jesse, thanks for such a prompt response, much appreciated. 

Sorry, the summary results didnt paste over correctly - see screenshot below showing low, est, and high values. 

To subset the veg layer into a series of logical rasters, do you mean like a yes/no or 1/0 structure for each particular vegetation type? For example, I believe Eucalypt woodlands are an important habitat so I would subset the veg layer to be 1 = Eucalypt woodlands and 0 = everything else in order to see if the species selects Eucalypt woodlands more/less often based on its availability?

Thanks again.
Chris. 

image.png






On Mon, Apr 29, 2024 at 12:59 PM Jesse Alston <jmals...@gmail.com> wrote:
Hi Chris,

I don't understand why you are not getting a "high" result in your RSF results--"est" is the point estimate, and "low" and "high" are the bounds of the confidence intervals. You can interpret these just like any other confidence intervals. Also, the variables are standardized under the hood, so betas should be interpreted as effects of 1 SD change in whatever your variable of interest is.

I don't think changing the fire frequency raster would make much difference. It would just change how you interpret the betas.

It looks to me like your veg raster was read by rsf.fit() as numeric. I would recommend making logical rasters from the veg types you are interested in, as this eliminates any possibility of mistakes like this. If you do this, make sure to leave out some layers to serve as your reference point (ideally, some layers that collectively exhibit roughly neutral selection).

In general, it is not great to re-project rasters because it causes data loss, but you may have to do it to get them lined up properly. I think rsf.fit() might do this automatically under the hood, but I can't remember--Chris F will have to weigh in on that.

Jesse

On Mon, Apr 29, 2024 at 8:11 AM Chris MacColl <redgosr...@gmail.com> wrote:
--
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/2f4cbcc3-1f50-455a-8b25-c81de83c686an%40googlegroups.com.

Jesse Alston

unread,
Apr 30, 2024, 5:52:38 PMApr 30
to Chris MacColl, ctmm R user group
Hi Chris,

I don't understand why you are not getting a "high" result in your RSF results--"est" is the point estimate, and "low" and "high" are the bounds of the confidence intervals. You can interpret these just like any other confidence intervals. Also, the variables are standardized under the hood, so betas should be interpreted as effects of 1 SD change in whatever your variable of interest is.

I don't think changing the fire frequency raster would make much difference. It would just change how you interpret the betas.

It looks to me like your veg raster was read by rsf.fit() as numeric. I would recommend making logical rasters from the veg types you are interested in, as this eliminates any possibility of mistakes like this. If you do this, make sure to leave out some layers to serve as your reference point (ideally, some layers that collectively exhibit roughly neutral selection).

In general, it is not great to re-project rasters because it causes data loss, but you may have to do it to get them lined up properly. I think rsf.fit() might do this automatically under the hood, but I can't remember--Chris F will have to weigh in on that.

Jesse

On Mon, Apr 29, 2024 at 8:11 AM Chris MacColl <redgosr...@gmail.com> wrote:
--
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/2f4cbcc3-1f50-455a-8b25-c81de83c686an%40googlegroups.com.

Christen Fleming

unread,
May 1, 2024, 12:57:02 AMMay 1
to ctmm R user group
Hi Chris,

It looks like rsf.fit is not seeing 'veg' as being a factor. You have to make that a factor with raster::as.factor and not with base-R functions. Its interesting that the covariate is significant, while probably being nonsensical (unless the vegetation types happen to be in order or something).

If you don't specify a formula, then everything is scaled for numerical precision under the hood.

betas are not standardized, but have units of the reciprocal of the covariate. So if Fire ranges from 0 to 22, then that selection effect will range from exp( -0.051084414* 0)=1 to exp(-0.051084414*22)=0.3250237. So, there is about 3x the probability in Fire=0 than Fire=22.

Best,
Chris

Chris MacColl

unread,
May 7, 2024, 3:31:39 PMMay 7
to Christen Fleming, ctmm R user group
Hi Chris, thanks for the feedback. Im starting to see some results that make sense but also a few things to follow up on soon. Before replicating my model across individuals, I was wondering about scaling the bounding box around the AKDE home range. For my test case, I used a 20km x 20km grid as the AKDE was nestled nicely within this extent; however, I wont be able to standardise this grid size across all individuals as some have very large home ranges (e.g. >700km2). 

Questions:
  • Should the bounding box used for the RSF be larger than the minimum bounding box encompassing the home range? If so, I assume this is to allow prediction of habitat selection via the suitability maps across a larger area than the AKDE? 
  • Should bounding boxes used in the RSF be standardised across individuals? If so, can I separate between groups such as breeders and non-breeders given the latter have much larger home ranges. 
Thank you,
Chris. 

You received this message because you are subscribed to a topic in the Google Groups "ctmm R user group" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ctmm-user/B6xnErRHD2Y/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ctmm-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ctmm-user/274d496e-6f0a-4c66-adfb-f7b3274e8979n%40googlegroups.com.

Christen Fleming

unread,
May 10, 2024, 11:51:02 PMMay 10
to ctmm R user group
Hi Chris,

rsf.fit() doesn't use the bounding box of the AKDE, so this is not something that you need to worry about for RSFs.

Best,
Chris

Chris MacColl

unread,
May 13, 2024, 2:55:55 PMMay 13
to Christen Fleming, ctmm R user group
So in terms of the size of clipped environmental rasters that I feed into the RSF, do they only need to be at least as big as each individual's AKDE home range? 

For example, you can see the AKDE of one individual below (blue) with a fire frequency raster layer which I have clipped using the minimum bounding box of the AKDE. 

I am having to run each individual RSF independently given the scale over which my study animals are dispersed (all across northern Australia) and plan to use mean() to compare between individuals once I get the RSFs working correctly. 

Thank you for your ongoing assistance. 
Chris

image.png

Christen Fleming

unread,
May 16, 2024, 11:07:23 PMMay 16
to Chris MacColl, ctmm R user group
Hi Chris,

I would use something bigger than the 95% coverage area, like the 99% upper limit of the 99% coverage area, to be safe.

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