|
View:
New views
5 Messages
—
Rating Filter:
Alert me
|
|
|
Brownian bridge outputHello again!
I have found an interesting problem with some of my Brownian bridge output. I have noticed that in many of the UDs I have created there are seemingly erroneous values in the probability distributions between sets of 2 points. I have attached a JPG of a UD to illustrate this, in which the errors are indicated by red circles. Looking at the ASCII output file (the file is very large, so I did not attach it), all the values within the blank boxes (as indicated in the JPG) are exactly 99.9999999999776, whereas the values immediately around the boxes are around 99.96xxxxx (values inside the box should be decreasing toward the center of the bridge). Has anyone experienced this before or have any ideas why this may occur? Thanks for your help! Andrea ![]() |
|
|
Re: Brownian bridge outputHello Andrea,
> Looking at the ASCII output file (the file is very large, so I did not > attach it), all the values within the blank boxes (as indicated in the JPG) > are exactly 99.9999999999776, whereas the values immediately around the > boxes are around 99.96xxxxx (values inside the box should be decreasing > toward the center of the bridge). > It is hard to find the solution of the problem without any reproducible example... It seems the the values of the UD are bounded to 100, but I cannot find why without sample data and corresponding code. Some key questions would allow to find out what happens here: what is the resolution of the map? does the problem occur if the resolution of the map changes? does the problem still occur if only the part of the trajectory where there is a problem is kept for the analysis? etc... Could you send a sample burst where the problem occurs, as well as your script? Regards, Clément. -- Clément CALENGE Office national de la chasse et de la faune sauvage Saint Benoist - 78610 Auffargis tel. (33) 01.30.46.54.14 _______________________________________________ AniMov mailing list AniMov@... http://www.faunalia.com/cgi-bin/mailman/listinfo/animov |
|
|
Re: Brownian bridge outputDear Clement,
I have isolated some of the problematic points and tested at different resolutions, and different smoothing parameters. The results do not seem to be affected by any of these changes, and even when running the analysis with only 2 points in question, the errors still occur. I have attached two .csv files with data from 2 different animals. Each file has 3 bursts with 2 points in each, between which the problematic bridges were created. The file B611 contains data from the image I attached in my previous post. The script I have used is copied below. (I apologize for the image quality of the output, but I am not sure how to create better images in R, and usually export the ASCII files to view the data). #### data<-read.csv("B611.csv") x<-data$x y<-data$y xy<-cbind(x,y) datetime<-data$datetime id<-data$id brst<-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<-5 liker(trj, sig2, byburst=T,rangesig1=c(0, 30),plotit=T) ##sig1 values as calculated from the original full data set are 3.87 for the file B589 and 5.86 for B611 sig1<-5.86 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)) ## My standard resolution is 25 x 25 m pixelsB589.csvB611.csv asc <- ascgen(xybox, cellsize=25) bb<-kernelbb(trj, sig1, sig2, byburst=T, grid=asc) images<-image(bb[[1]]$UD) images<-image(bb[[2]]$UD) images<-image(bb[[3]]$UD) #### Best regards, Andrea |
|
|
Re: Brownian bridge outputSorry, I didn't realize the attachements were inserted in the middle of the text...they are at the bottom here.
Cheers, Andrea Dear Clement, I have isolated some of the problematic points and tested at different resolutions, and different smoothing parameters. The results do not seem to be affected by any of these changes, and even when running the analysis with only 2 points in question, the errors still occur. I have attached two .csv files with data from 2 different animals. Each file has 3 bursts with 2 points in each, between which the problematic bridges were created. The file B611 contains data from the image I attached in my previous post. The script I have used is copied below. (I apologize for the image quality of the output, but I am not sure how to create better images in R, and usually export the ASCII files to view the data). #### data<-read.csv("B611.csv") x<-data$x y<-data$y xy<-cbind(x,y) datetime<-data$datetime id<-data$id brst<-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<-5 liker(trj, sig2, byburst=T,rangesig1=c(0, 30),plotit=T) ##sig1 values as calculated from the original full data set are 3.87 for the file B589 and 5.86 for B611 sig1<-5.86 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)) ## My standard resolution is 25 x 25 m pixels asc <- ascgen(xybox, cellsize=25) bb<-kernelbb(trj, sig1, sig2, byburst=T, grid=asc) images<-image(bb[[1]]$UD) images<-image(bb[[2]]$UD) images<-image(bb[[3]]$UD) #### Best regards, Andrea B589.csvB611.csv |
|
|
Re: Brownian bridge outputDear Andrea,
> I have isolated some of the problematic points and tested at different > resolutions, and different smoothing parameters. The results do not seem > to be affected by any of these changes, and even when running the analysis > with only 2 points in question, the errors still occur. > Actually, you identified a bug in the function kernelbb. This bug occurs when the smoothing parameter is much smaller than the length of the line segment connecting two successive relocations (your smoothing parameter sig2 is about 5m, whereas the size of the first step in your trajectory is several thousands metres; if you try to increase the smoothing parameter to larger values, the problem no longer occurs). This bug is caused by a "bounding box" defined internally around each grid cell, which is used to identify the most influential relocations (this was used to speed up the process); the size of this bounding box depends on the smoothing parameter (the "blank" area in your graphs is the set of pixels for which no relocations were found in this bounding box -- which also explains the shape of this area). I corrected this function, and have included the correction in the new version of the package (1.8.2). I just have uploaded this new version to CRAN. It will probably be available on CRAN on next Monday or Tuesday. Thanks for the bug report, Regards, Clément. -- Clément CALENGE Office national de la chasse et de la faune sauvage Saint Benoist - 78610 Auffargis tel. (33) 01.30.46.54.14 _______________________________________________ AniMov mailing list AniMov@... http://www.faunalia.com/cgi-bin/mailman/listinfo/animov |
| Free embeddable forum powered by Nabble | Forum Help |