2017-03-03 72 views
0

我一直在使用R軟件包adehabitatHR查找一些企鵝的內核密度等值線,並且一切正常。但是,當我使用mcp或kernel.area查找50%和95%輪廓內的區域時,我得到的估計值非常低。這些鳥類正在旅行30-80公里,但面積估計將回升至3.087401 x 10^-7ha。以前的數據顯示面積估計爲4000-6000ha。 有誰知道可能會發生什麼? 謝謝!查找內核密度區域

#please ignore all the libraries, I'm new to R and keep them all up 
    library(adehabitatHR) 
    library(sp) 
    library(rgdal) 
    library(raster)   
    F14A <- read_csv("74F314A f.csv") 
    str(F14A) 
    loc <- F14A[, c("Latitude", "Longitude")] 
    str(loc) 
    # Change Lat & Long to spatial points 
    loc <- as.matrix.data.frame(loc) 
    loc <- SpatialPoints(loc) 
    ## Estimation of KUD 
    ud <- kernelUD(loc, h = "href", grid = 100, same4all = FALSE, 
      kern = c("bivnorm"), extent = 1) 
    mcp(loc, percent=100) 
    mcp.area(loc,percent=seq(50,95, by=5), unin = c("m"), 
     unout = c("ha")) 

回答

0

我會好奇你的內核帶寬。如果你正在使用一個函數來爲你計算帶寬,那麼它可能會發生的任何優化都會陷入一個非常有用的值(這發生在我身上) - 太小的內核帶寬將導致遠遠的核密度面積太小。

如果您正在使用的函數有contour()的實現,我會傾向於plot(contour(ud))來查看它是否看起來像一個很好的等值線圖(如果不是!)如果不是,請嘗試將內核帶寬設置爲某些不同的值來看結果如何表現。

這看起來像是一個博學的觀點,但帶寬選擇是涉及內核密度的任何分析的關鍵和非平凡部分。不幸的是,有些時候黑盒軟件不會像您(主題專家)那樣選擇作爲研究適合的帶寬。

0

等高線圖看起來很好,它們很適合地圖,並且跟蹤了我所擁有的曲目。該地圖是一個shape文件,它也內置了GPS座標。

問題是我的觀點沒有正確轉變。對於有同樣問題的其他人,我使用下面的代碼將其轉換爲UTM區域55,然後kernel.area函數完美工作。

longlatcoor<-SpatialPoints(cbind(F14A$Longitude,F14A$Latitude), proj4string=CRS("+proj=longlat +datum=WGS84")) 
    # converting 
    utmcoord<-spTransform(longlatcoor,CRS("+proj=utm +south +zone=55 +datum=WGS84")) 
    utmcoord #just to double check the transformation has occured 
    kud<-kernelUD(utmcoord, h="href", grid=100, hlim = c(0.1, 1.5), kern = c("bivnorm"), extent = 0.5,boundary=barrier) 
    image(kud) 
    kernel.area(kud,percent=seq(50,95,by=5),unin=("m"),unout=("ha")) 

這產生GPS值就像緯度319187.6長5807109,和公頃最終內核領域是:50%= 1153.162,95%= 7025.186,這更接近我所期待的。