为了探索我的数据(在某些位置存在/缺失数据)我希望使用“移动”包使用动态布朗运动桥运动模型(dBBMM)对利用率分布进行建模。我试图弄清楚它是如何工作的,所以我创建了一个简单的代码来运行我的数据子集的dBBMM,以创建一些图。似乎相同的编码规范适用于1个子集,但不适用于其他规范。具体来说,我得到的错误返回R动态布朗运动模型栅格错误
Error in .local(object, raster, location.error, ext, ...) :
Lower x grid not large enough
这是数据的一个子集:
data.ss1<-structure(list(timestamp = structure(c(1455851760, 1455851880,
1455852000, 1455852180, 1455857220, 1455857340, 1455915720, 1455915780,
1455916020, 1455917760, 1455918240, 1455920100, 1455920520, 1455920700,
1455920940, 1455921060, 1456786200, 1456786620, 1456788960, 1456789080,
1456789200, 1456821540, 1456821660, 1456821960, 1457295480, 1457295600,
1457296260, 1457296380, 1457296500, 1457296800, 1457319240, 1457319540,
1457319660, 1457319780, 1457322900, 1457323020, 1457323140, 1457323320,
1457323440, 1457325000, 1457325180, 1457325420, 1457325600, 1457325720,
1457326560, 1457326680, 1457333340, 1457333700, 1457333820, 1457334000,
1457334120, 1457334240, 1457334360, 1457353800, 1457353920, 1457354040,
1457354280, 1457354400, 1457354700, 1457355780, 1457355960, 1457356080,
1457356200, 1457356320, 1457364600, 1457364780, 1457365020, 1457365320,
1457365500, 1457365620, 1457365740, 1457365860, 1457365980, 1457366100,
1457366220, 1457407200, 1457407380, 1457407500, 1457407560, 1457407680,
1457407800, 1457407920, 1457408040, 1457408160, 1457408280, 1457408340,
1457408580, 1457408700, 1457408820, 1457408940, 1457409060, 1457409480,
1457409600, 1457409780, 1457409900, 1457410320, 1457412540, 1457412660,
1457412780, 1457412900), class = c("POSIXct", "POSIXt"), tzone = "US/Eastern"),
station = c(109655L, 109655L, 109655L, 109655L, 124083L,
124083L, 126404L, 126404L, 126404L, 126412L, 126412L, 126413L,
126413L, 126413L, 126413L, 126413L, 102307L, 102307L, 126413L,
126413L, 126413L, 126407L, 126407L, 126407L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 104668L, 104668L, 104668L,
104668L, 126408L, 126408L, 126408L, 126408L, 126408L, 126410L,
126410L, 126410L, 126410L, 126410L, 126410L, 126410L, 104668L,
104668L, 104668L, 104668L, 104668L, 104668L, 104668L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L, 124086L, 124086L, 124086L,
124086L, 124086L, 124086L, 124086L), elasmo = structure(c(5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L,
5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L, 5L), .Label = c("7954", "19681",
"19690", "19691", "20180", "20182", "20184", "23156", "23794",
"23796", "27549", "27551"), class = "factor"), location = c("pier",
"pier", "pier", "pier", "new barge", "new barge", "bimini barge",
"bimini barge", "bimini barge", "west west round rock", "west west round rock",
"west north west turtle", "west north west turtle", "west north west turtle",
"west north west turtle", "west north west turtle", "south west south turtle",
"south west south turtle", "west north west turtle", "west north west turtle",
"west north west turtle", "mini wall", "mini wall", "mini wall",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"west round rock", "west round rock", "west round rock",
"west round rock", "northwest turtle rock", "northwest turtle rock",
"northwest turtle rock", "northwest turtle rock", "northwest turtle rock",
"west turtle", "west turtle", "west turtle", "west turtle",
"west turtle", "west turtle", "west turtle", "west round rock",
"west round rock", "west round rock", "west round rock",
"west round rock", "west round rock", "west round rock",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west", "mini barge west",
"mini barge west", "mini barge west"), Y = c(25.76453, 25.76453,
25.76453, 25.76453, 25.74273, 25.74273, 25.69792, 25.69792,
25.69792, 25.68681, 25.68681, 25.67408, 25.67408, 25.67408,
25.67408, 25.67408, 25.65654, 25.65654, 25.67408, 25.67408,
25.67408, 25.81482, 25.81482, 25.81482, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.68646, 25.68646,
25.68646, 25.68646, 25.67416, 25.67416, 25.67416, 25.67416,
25.67416, 25.66495, 25.66495, 25.66495, 25.66495, 25.66495,
25.66495, 25.66495, 25.68646, 25.68646, 25.68646, 25.68646,
25.68646, 25.68646, 25.68646, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441, 25.72441, 25.72441, 25.72441, 25.72441,
25.72441, 25.72441), X = c(-79.29315, -79.29315, -79.29315,
-79.29315, -79.30235, -79.30235, -79.31699, -79.31699, -79.31699,
-79.32016, -79.32016, -79.31871, -79.31871, -79.31871, -79.31871,
-79.31871, -79.3227, -79.3227, -79.31871, -79.31871, -79.31871,
-79.28847, -79.28847, -79.28847, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.31012, -79.31012, -79.31012,
-79.31012, -79.30888, -79.30888, -79.30888, -79.30888, -79.30888,
-79.31092, -79.31092, -79.31092, -79.31092, -79.31092, -79.31092,
-79.31092, -79.31012, -79.31012, -79.31012, -79.31012, -79.31012,
-79.31012, -79.31012, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922, -79.30922, -79.30922, -79.30922, -79.30922, -79.30922,
-79.30922)), .Names = c("timestamp", "station", "elasmo",
"location", "Y", "X"), row.names = c(NA, 100L), class = "data.frame")
这是第二:
data.ss2<-structure(list(timestamp = structure(c(1414786140, 1414786740,
1420747380, 1420750020, 1425956580, 1425956940, 1427796900, 1427797080,
1453615800, 1453616040, 1453616400, 1453618020, 1453618920, 1453619580,
1453619760, 1460017140, 1460017680, 1460017860, 1460141880, 1460142060,
1460144040, 1460145300, 1460181840, 1460183100, 1460215860, 1460216100,
1460378040, 1460378760, 1460403840, 1460404140, 1460456100, 1460456280,
1460456460, 1460540340, 1460541600, 1460863560, 1460864160, 1460875860,
1460876880, 1460882040, 1460883960, 1460887200, 1460887740, 1460928540,
1460929200, 1460948160, 1460948340, 1460953920, 1460954220, 1461037440,
1461038100, 1461041220, 1461041400, 1461041580, 1461043320, 1461043500,
1461046260, 1461046440, 1461059340, 1461059700, 1461059820, 1461060000,
1461060720, 1461061440, 1461061860, 1461062100, 1461062700, 1461062880,
1461063060, 1461063240, 1461063420, 1461064140, 1461064320, 1461064500,
1461064800, 1461065160, 1461065340, 1461065880, 1461066780, 1461066960,
1461072060, 1461072300, 1461072900, 1461073080, 1461119580, 1461120240,
1461124320, 1461124500, 1461124620, 1461166500, 1461166680, 1461166920,
1461167100, 1461216840, 1461217560, 1461218880, 1461219060, 1461219660,
1461219840, 1461221280), class = c("POSIXct", "POSIXt"), tzone = "US/Eastern"),
station = c(104667L, 104667L, 124097L, 124097L, 125904L,
125904L, 125907L, 125907L, 126408L, 126408L, 126408L, 126410L,
126410L, 126411L, 126411L, 126406L, 126406L, 126406L, 125906L,
125906L, 125906L, 125906L, 125904L, 126406L, 125904L, 125904L,
106809L, 106809L, 125906L, 125906L, 126408L, 126408L, 126408L,
126408L, 126408L, 126408L, 126408L, 126410L, 126410L, 126408L,
126408L, 126411L, 126411L, 104668L, 104668L, 104668L, 104668L,
126411L, 126411L, 104668L, 104668L, 126410L, 126410L, 126410L,
126411L, 126411L, 126411L, 126411L, 126404L, 126404L, 126404L,
126404L, 126404L, 126404L, 126404L, 126404L, 126404L, 126404L,
126404L, 126404L, 126404L, 126404L, 126404L, 126404L, 126404L,
126404L, 126404L, 126404L, 126404L, 126404L, 126404L, 126404L,
126404L, 126404L, 104668L, 104668L, 126410L, 126410L, 126410L,
126408L, 126408L, 126408L, 126408L, 126413L, 126413L, 104668L,
104668L, 104668L, 104668L, 126408L), elasmo = structure(c(11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L, 11L,
11L, 11L, 11L), .Label = c("7954", "19681", "19690", "19691",
"20180", "20182", "20184", "23156", "23794", "23796", "27549",
"27551"), class = "factor"), location = c("bimini barge",
"bimini barge", "northwest turtle rock", "northwest turtle rock",
"west turtle", "west turtle", "west west round rock", "west west round rock",
"northwest turtle rock", "northwest turtle rock", "northwest turtle rock",
"west turtle", "west turtle", "south west turtle", "south west turtle",
"south bimini 3", "south bimini 3", "south bimini 3", "south bimini 1",
"south bimini 1", "south bimini 1", "south bimini 1", "south bimini 3 south",
"south bimini 3", "south bimini 3 south", "south bimini 3 south",
"south bimini 1 south", "south bimini 1 south", "south bimini 1",
"south bimini 1", "northwest turtle rock", "northwest turtle rock",
"northwest turtle rock", "northwest turtle rock", "northwest turtle rock",
"northwest turtle rock", "northwest turtle rock", "west turtle",
"west turtle", "northwest turtle rock", "northwest turtle rock",
"south west turtle", "south west turtle", "west round rock",
"west round rock", "west round rock", "west round rock",
"south west turtle", "south west turtle", "west round rock",
"west round rock", "west turtle", "west turtle", "west turtle",
"south west turtle", "south west turtle", "south west turtle",
"south west turtle", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "bimini barge",
"bimini barge", "bimini barge", "bimini barge", "west round rock",
"west round rock", "west turtle", "west turtle", "west turtle",
"northwest turtle rock", "northwest turtle rock", "northwest turtle rock",
"northwest turtle rock", "west north west turtle", "west north west turtle",
"west round rock", "west round rock", "west round rock",
"west round rock", "northwest turtle rock"), Y = c(25.69792,
25.69792, 25.67416, 25.67416, 25.66495, 25.66495, 25.68681,
25.68681, 25.67416, 25.67416, 25.67416, 25.66495, 25.66495,
25.65662, 25.65662, 25.68256, 25.68256, 25.68256, 25.68266,
25.68266, 25.68266, 25.68266, 25.67332, 25.68256, 25.67332,
25.67332, 25.67316, 25.67316, 25.68266, 25.68266, 25.67416,
25.67416, 25.67416, 25.67416, 25.67416, 25.67416, 25.67416,
25.66495, 25.66495, 25.67416, 25.67416, 25.65662, 25.65662,
25.68646, 25.68646, 25.68646, 25.68646, 25.65662, 25.65662,
25.68646, 25.68646, 25.66495, 25.66495, 25.66495, 25.65662,
25.65662, 25.65662, 25.65662, 25.69792, 25.69792, 25.69792,
25.69792, 25.69792, 25.69792, 25.69792, 25.69792, 25.69792,
25.69792, 25.69792, 25.69792, 25.69792, 25.69792, 25.69792,
25.69792, 25.69792, 25.69792, 25.69792, 25.69792, 25.69792,
25.69792, 25.69792, 25.69792, 25.69792, 25.69792, 25.68646,
25.68646, 25.66495, 25.66495, 25.66495, 25.67416, 25.67416,
25.67416, 25.67416, 25.67408, 25.67408, 25.68646, 25.68646,
25.68646, 25.68646, 25.67416), X = c(-79.31699, -79.31699,
-79.30888, -79.30888, -79.31092, -79.31092, -79.32016, -79.32016,
-79.30888, -79.30888, -79.30888, -79.31092, -79.31092, -79.31325,
-79.31325, -79.2818, -79.2818, -79.2818, -79.30135, -79.30135,
-79.30135, -79.30135, -79.28196, -79.2818, -79.28196, -79.28196,
-79.30154, -79.30154, -79.30135, -79.30135, -79.30888, -79.30888,
-79.30888, -79.30888, -79.30888, -79.30888, -79.30888, -79.31092,
-79.31092, -79.30888, -79.30888, -79.31325, -79.31325, -79.31012,
-79.31012, -79.31012, -79.31012, -79.31325, -79.31325, -79.31012,
-79.31012, -79.31092, -79.31092, -79.31092, -79.31325, -79.31325,
-79.31325, -79.31325, -79.31699, -79.31699, -79.31699, -79.31699,
-79.31699, -79.31699, -79.31699, -79.31699, -79.31699, -79.31699,
-79.31699, -79.31699, -79.31699, -79.31699, -79.31699, -79.31699,
-79.31699, -79.31699, -79.31699, -79.31699, -79.31699, -79.31699,
-79.31699, -79.31699, -79.31699, -79.31699, -79.31012, -79.31012,
-79.31092, -79.31092, -79.31092, -79.30888, -79.30888, -79.30888,
-79.30888, -79.31871, -79.31871, -79.31012, -79.31012, -79.31012,
-79.31012, -79.30888)), .Names = c("timestamp", "station",
"elasmo", "location", "Y", "X"), row.names = c(NA, 100L), class = "data.frame")
我的问题是,我不真的知道如何设置与扩展参数相结合的栅格参数。它给出给定指定模型的1个数据集的错误,但不是另一个。这些只是大型个人数据集的2个迷你子集,而且我有> 100个人。因此,如果我能够指定一个能够尽可能容纳所有数据集的模型,那将会很有用。我想我可以将ext
参数设置为我的所有模型的大量参数,但我不确定这是否是理想和最佳方法。感谢您的任何帮助!
这是我使用的子集将R代码:
require(move)
ss1 <- move(x=data.ss1$X, y=data.ss1$Y, time=as.POSIXct(data.ss1$timestamp, format="%Y-%m-%d %H:%M", tz="US/Eastern"),
proj=CRS("+proj=longlat +ellps=WGS84"),data=data.ss1, animal="20186")
data.sAEQD1 <- spTransform(ss1, center=T)
x_UD1 <- brownian.bridge.dyn(data.sAEQD1, window.size=31, ext=1.5,
margin=15, raster=100,
location.error=23)
ss2 <- move(x=data.ss2$X, y=data.ss2$Y, time=as.POSIXct(data.ss2$timestamp, format="%Y-%m-%d %H:%M", tz="US/Eastern"),
proj=CRS("+proj=longlat +ellps=WGS84"),data=data.ss2, animal="27549")
data.sAEQD2 <- spTransform(ss2, center=T)
x_UD2 <- brownian.bridge.dyn(data.sAEQD2, window.size=31, ext=1.5,
margin=15, raster=100,
location.error=23)