Forcing ctmm.select to consider IID

69 views
Skip to first unread message

Nell

unread,
Feb 25, 2021, 6:58:29 AM2/25/21
to ctmm R user group

Hi Chris,

Whilst trying to generate KDEs, some of my fitted models from ctmm.select() aren't showing the IID in the summary(fitted.model). I understand from the vignettes and from a question asked here last year that it's to do with how the models are nested, but I'm having trouble getting ctmm.select to consider IID so I can generate KDEs as well as AKDEs from the same fitted model.

I've read the 'levels' documentation and I'm not entirely sure how it relates to IIDs, so I've followed the process in https://cran.r-project.org/web/packages/ctmm/vignettes/akde.html and tried using ctmm.fit() to generate IIDs instead. However, this gives slightly different results from just selecting the row from the summary of the ctmm.select() model (see code below).

Ideally I'd just get ctmm.select to consider IID for all my individuals, so that when I fit a model for each of them, I can generate their AKDEs and KDEs from the same model, rather than fitting one model for AKDE and another for KDE. Is there any way I can do this? What would you advise?

Thanks very much for your help,
Nell



summary(fitted.model.1)  

iid<-fitted.model.1[[7]]  # the IID on row 7

M.IID<-ctmm.fit(i1)        # M.IID<-ctmm.fit (Pepper) with no autocorrelation timescales (from vignette)

 

kde.1<-akde(i1, CTMM=iid)

kde.1.trial<-akde(i1, CTMM=M.IID)

 

summary(kde.1, level.UD = 0.95)

summary(kde.1.trial, level.UD=0.95)

 

> summary(kde.1)

$DOF

     area bandwidth

 573.0000  573.9998

 

$CI

                          low     est    high

area (square meters) 4130.836 4491.08 4866.17

 

> summary(kde.1.trial)

$DOF

     area bandwidth

 558.8033  573.9998

 

$CI

                          low      est     high

area (square meters) 4123.958 4488.439 4868.134


Christen Fleming

unread,
Feb 25, 2021, 5:06:33 PM2/25/21
to ctmm R user group
Hi Nell,

IID ⊂ OU ⊂ OUF are properly nested models, so if OUF is selected over OU, then IID is never attempted by ctmm.select(), as it would be computationally wasteful. But you can include it manually.

Your M.IID is going to be the IID anisotropic model. Is iid anisotropic or isotropic? iid gives a larger effective sample size for the area, equal to that of the bandwidth - 1, which would indicate to me that it is isotropic.
You can include both, manually, if you want. You just need a CTMM=ctmm(isotropic=TRUE) argument.

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