[AniMov] burst function in liker and kernelbb

Andrea Maxie andrea.maxie at gmail.com
Thu Jan 29 20:42:37 CET 2009


Dear Clement,

Thank you for your reply.  I investigated the data I was using and a single
value in a burst caused the “NA/NaN/Inf in foreign function call (arg 1)”
error.  

I have looked at the structure of the kernelbb output when using the byburst
function, and have realized that it was not providing the output I had
expected.  ie. kernelbb with byburst=T creates individual UDs for each
burst, whereas I am hoping to create a single BB UD using multiple bursts. 
For my data, the purpose of using a burst is to eliminate the estimation of
a probability distribution between 2 points (at the end and start of
consecutive bursts), between which a series of locations was removed (ex.
Creating a UD for ‘day’ by removing all ‘night’ locations, and not
calculating a Brownian bridge between each day).

Is it possible to compute this through the adehabitat package?  

Another useful possibility could be to set an upper limit on the possible
time lapse between fixes (ie. a brownian bridge won't be computed between
any two locations that are greater than, say, 6 hours apart).  

 have again included the script I have used as well as a small sample data
set (attached, but copied below in case the attachment doesn't work), which
includes data for 3 consecutive nights, each labelled as a separate burst.

Sample script: 

data<-read.csv("burst_test.csv")
x<-data$x
y<-data$y
xy<-cbind(x,y)
datetime<-data$datetime
id<-data$id
brst<-data$burst
da<-as.POSIXct(strptime(as.character(data$datetime), tz="GMT", "%d/%m/%Y
%T"))
trj<-as.ltraj(xy,da,id,burst=brst,typeII=T,slsp="remove")
sig2<-10
liker(trj, sig2, byburst=T, rangesig1=c(0, 30))

xybox <- data.frame(x=c(min(na.omit(data$x))-2500,
max(na.omit(data$x))+2500), 
                        y=c(min(na.omit(data$y))-2500,
max(na.omit(data$y))+2500)) 
asc <- ascgen(xybox, cellsize=250) 

bb<-kernelbb(trj, sig1=1.8619, sig2, byburst=T,grid=asc)
save(bb, file="test.rdata")
images<-image(bb[[1]]$UD)
contour(getvolumeUD(bb)[[1]]$UD, level=99, add=T, col="red", lwd=2)
udvol<-getvolumeUD(bb)
export.asc(udvol[[1]]$UD, "test.asc")
ver99<-getverticeshr(bb, lev=99)
sh99<-kver2shapefile(ver99, which=names(ver99))
write.shapefile(sh99,"test_ctr99")

Sample data:  

http://www.nabble.com/file/p21734305/sampledata.csv sampledata.csv 

id	datetime	x	y	burst
10_2007_Spring	09/05/2007 21:32:04	700980	5054554	1
10_2007_Spring	09/05/2007 22:00:28	700923	5054584	1
10_2007_Spring	09/05/2007 22:30:54	700923	5054575	1
10_2007_Spring	09/05/2007 23:02:14	700925	5054573	1
10_2007_Spring	10/05/2007 00:02:28	700921	5054585	1
10_2007_Spring	10/05/2007 00:31:15	700922	5054614	1
10_2007_Spring	10/05/2007 01:30:53	700924	5054589	1
10_2007_Spring	10/05/2007 02:01:14	700924	5054576	1
10_2007_Spring	10/05/2007 02:30:36	700921	5054576	1
10_2007_Spring	10/05/2007 03:01:03	700933	5054576	1
10_2007_Spring	10/05/2007 03:32:11	700912	5054566	1
10_2007_Spring	10/05/2007 04:33:00	700922	5054580	1
10_2007_Spring	10/05/2007 05:01:24	700923	5054580	1
10_2007_Spring	10/05/2007 21:30:44	699095	5055290	2
10_2007_Spring	10/05/2007 22:00:23	699114	5055316	2
10_2007_Spring	10/05/2007 22:32:14	699114	5055299	2
10_2007_Spring	11/05/2007 00:03:05	699116	5055317	2
10_2007_Spring	11/05/2007 01:00:54	699126	5055303	2
10_2007_Spring	11/05/2007 01:33:06	699118	5055309	2
10_2007_Spring	11/05/2007 02:03:01	699117	5055347	2
10_2007_Spring	11/05/2007 02:31:51	699102	5055280	2
10_2007_Spring	11/05/2007 04:02:12	699150	5055323	2
10_2007_Spring	11/05/2007 04:31:20	699090	5055342	2
10_2007_Spring	11/05/2007 05:01:45	699125	5055301	2
10_2007_Spring	11/05/2007 21:30:37	701211	5056080	3
10_2007_Spring	11/05/2007 23:01:23	701187	5056040	3
10_2007_Spring	12/05/2007 00:02:37	701166	5056047	3
10_2007_Spring	12/05/2007 00:32:41	701241	5056118	3
10_2007_Spring	12/05/2007 02:01:47	701176	5056061	3
10_2007_Spring	12/05/2007 02:31:50	701176	5056068	3
10_2007_Spring	12/05/2007 03:02:23	701192	5056057	3
10_2007_Spring	12/05/2007 03:31:28	701190	5056072	3
10_2007_Spring	12/05/2007 04:03:05	701209	5056052	3
10_2007_Spring	12/05/2007 05:01:18	701190	5056068	3



-- 
View this message in context: http://www.nabble.com/burst-function-in-liker-and-kernelbb-tp21593626p21734305.html
Sent from the AniMov mailing list archive at Nabble.com.



More information about the AniMov mailing list