Issue with rsf.select() Dropping Some Values but not Others

90 views
Skip to first unread message

Issy Perry

unread,
Feb 24, 2025, 12:11:53 PM2/24/25
to ctmm R user group

Hello Dr. Fleming, I am currently analyzing how resource selection for giant anteaters may differ between individuals who were orphaned/rehabbed and individuals who were wild-raised. However, I am having a bit of difficulty with generating RSFs. For context, my named raster list consists of six rasters that represent different land types in the area. If a cell has the land type in it, the cell is renamed to “TRUE”, and if the cell does not have the land type in it, the cell is renamed to “FALSE”. From my understanding, rsf.select() is better for working with movement models on these kinds of rasters since rsf.fit() tends to flatten and expand confidence intervals, which has been my experience. However, when I use summary() on my results, several land types have been excluded. From my understanding, this is normal, as rsf.select() will drop non-significant values from the results; however, my results occasionally still include non-significant values. Additionally, mean() does not pick up the values for land types that rsf.select() dropped. For a visual, I have included screenshots from summary() for my rsf.select() results and one from rsf.fit() to illustrate how wide those confidence intervals are. 

Summary_Results_RSF_Select_Makao.png

Summary_Results_RSF_Fit_Makao.png

Summary_No_Results_RSF_Select_Puji.png

Questions:

 1. Why is rsf.select() dropping some non-significant values but not others?

2.       2. Why am I getting no results for some individuals?

3.       3. Is there a way I can make sure that rsf.select() outputs results for all of my land types instead of the function randomly dropping some? I want to compare the results on a population level, but I will be visualizing these results with individual points as well. Additionally, I will be doing a moving window analysis on selection for each individual. So overall, I would like rsf.select() to provide results for all land types, whether they are significant or not.

The for.loop I am using is as follows:

RSF_17 <- list()

for(i in 1:length(DATA_17)){

  #extract individual

  DATA <- DATA_17[[i]]

  #extract AKDE

  AKDE <- AKDE_17[[i]]

  #ensure projections are the same

  ctmm::projection(DATA) <- ctmm::projection(AKDE)

  #fit RSF

  RSF_17[[i]] <- rsf.select(DATA, UD = AKDE, R = covers)

} #close the loop

I apologize for how long this post is; I thought it would be best to give you all of the information now rather than go back and forth. Any help with this would be greatly appreciated as I am running out of ideas on how to solve this problem.

Best Regards, Issy Perry


Issy Perry

unread,
Feb 25, 2025, 7:51:20 PM2/25/25
to ctmm R user group
I spoke to someone in the lab I am in and realized I misunderstood a previous response on this google group (https://groups.google.com/g/ctmm-user/c/B6xnErRHD2Y). I now understand that it is as long as a CI does not include 0 that the result is significant rather than a CI being less than 0 (with CI less than zero indicating significant negative selection and CI greater than zero indicating significant positive selection). Based on this, please ignore questions 1 and 2 as I now believe that individuals with no results are neither selecting for nor selecting against specific land types. However, I would still really appreciate guidance on question 3. I would love to have a result that was a Frankenstein child of the results of rsf.fit() and rsf.select() — accurately significant/non-significant with small CIs but still include all covariates. Otherwise, I will proceed with my rsf.select() for.loop as written above.

Christen Fleming

unread,
Mar 15, 2025, 3:01:21 AM3/15/25
to ctmm R user group
Hi Issy,

The function of rsf.select() is to use AIC/BIC to select covariates and not necessarily include them all. If you want all of the covariates, you can just use the global model from rsf.fit(). However, this is dangerous when using meta-analysis to fit the hierarchical model via mean(), because the covariance matrix can have large numerical errors and the meta-analysis model needs an accurate covariance matrix. This is also dangerous when examining CIs from a global model calculated via likelihood maximization in any regression context, though this is not widely known.

You could use the global model from rsf.fit() in your sliding window analysis, but check that the CIs don't become extremely large. If they do, then the estimates of the selected model will be more reliable.

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