### Data used for sperm whale analysis of Moore and Barlow, file edited 2 March 2014 ### ### Note -- format below is for calling OpenBUGS from R. If pasting this file directly in to OpenBUGS, array formats need slight modification (remove function "t" or "aperm" before "structure" and switch values of .Dim argument) bugs.data <- list( W = 5.5, # Truncation distance (km) (note W is capitalized) T = c(1,3,6,11,15,18), # value = true year - 1991 + 1 nStrata = 4, # number of geographic strata # stratum areas (SoCal, central, NoCal, ORWA) A = c(318541, 242959, 258070, 322237), nYrs = 6, # number of survey years of data allYrs = 26, # 1991 - 2014 (last 8 years are projections) # observed transect length in each stratum-year # vector lists all elements in row 1, then in row 2, etc L = t(structure( .Data = c(4040, 2627, 3994, 2455, 2837, 3034, 2967, 1523, 3056, 1608, 2385, 2894, 3018, 2085, 3287, 2376, 2665, 2396, 0, 0, 4337, 3098, 2951, 3237), .Dim = c(6,4))), # rows (strata) x columns (years) # Amount of effort in each Beaufort state, by j,t (rows=strata, columns=yrs, each matrix is a beaufort class) Lb = aperm(structure( .Data=c( # Matrix for Beaufort 0-1 effort in each j,t 270,16,107,27,74,121, 243,195,194,34,2,147, 285,151,294,89,150,89, 0,0,190,115,27,117, # Matrix for Beaufort 2 effort in each j,t 471,364,318,104,474,410, 381,200,267,331,36,402, 646,468,378,268,424,165, 0,0,342,265,393,390, # Matrix for Beaufort 3 effort in each j,t 689,661,1008,415,583,531, 628,530,810,321,450,330, 778,661,717,255,555,316, 0,0,1009,553,659,469, # Matrix for Beaufort 4 effort in each j,t 1950,875,1431,1109,1114,873, 1164,363,1120,658,1335,1260, 1055,522,1088,1118,823,821, 0,0,1507,1605,1142,1222, # Matrix for Beaufort 5 effort in each j,t 660,711,1130,801,592,1099, 552,235,666,264,568,755, 254,284,810,646,712,1004, 0,0,1288,560,731,1039), .Dim = c(6,4,5))), # years, strata, no. Beaufort states (dim of array in R is bft classes(5), strata(4), yrs(6) ) # number groups detected in each stratum-year (row1=SC, row2=CC, row3=NC, row4=OW), by group size class n = aperm(structure( .Data = c(4,0,2,0,2,1, # small groups (1 or 2 animals) 0,0,1,1,0,3, 0,1,1,3,7,3, 0,0,1,1,3,3, 7,1,1,4,1,1, # large groups (> 2 animals) 2,4,2,0,0,0, 0,7,2,1,7,2, 0,0,3,1,1,0), .Dim = c(6,4,2))), # dim of array in R is 2,4,6 #Ngrps = 84, # number of data records y = c( # detection distances 0.96, 2.09, 1.39, 1.73, 0.28, 1.85, 2.06, 0.16, 2.73, 0.36, 4.3, 4.5, 2.59, 3.63, 4.74, 4.93, 4.46, 0.61, 4, 4.89, 4.62, 1.24, 0.86, 4.53, 3.9, 2.88, 0.78, 4.18, 2.52, 0.28, 4.08, 0.97, 4.12, 1.24, 4.67, 3.79, 0.27, 0.39, 1.14, 0.74, 0, 1.54, 1.28, 2.64, 2.42, 0.42, 2, 2.34, 3.76, 3.51, 3.22, 0.3, 4.03, 4.12, 1.38, 0.96, 1.84, 0.67, 0.48, 3.31, 0.19, 0.41, 1.99, 2.59, 0.57, 3.75, 0, 3.41, 4.47, 1.16, 0.65, 4.29, 0.73, 1.81, 4.65, 2.39, 0, 1.11, 1.59, 2.25, 2.84, 4.42, 1.15, 4.45), # dummy variable for years when group size needs correction m = c(1,1,1,0,0,0), # group (cluster) sizes cs = c( 1, 1.7, 9.7, 3.7, 1, 1, 3.2, 5.2, 13.3, 4, 9, 3.6, 3.5, 4.5, 2.3, 2.3, 6, 3.5, 1, 3, 10.8, 19.7, 8, 22, 10, 18, 17.3, 7.5, 3.5, 2, 1, 12, 3.4, 14, 4, 3, 1, 1, 2, 36.4, 12.6, 24.3, 1, 1.3, 1, 1, 3, 12.4, 4.5, 1.2, 1, 1, 1, 22.7, 11.4, 2.1, 11.4, 20.9, 1, 1, 1, 1, 29.8, 1, 2, 23.1, 14.3, 15.3, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3.3, 4, 1, 1, 37.2), # records for which group size is > 2 lgGrp.idx = c(3, 4, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 32, 33, 34, 35, 36, 40, 41, 42, 47, 48, 49, 54, 55, 56, 57, 58, 63, 66, 67, 68, 80, 81, 84), nLgGrps = 47, # records for which group size is <= 2 smGrp.idx = c(1, 2, 5, 6, 19, 30, 31, 37, 38, 39, 43, 44, 45, 46, 50, 51, 52, 53, 59, 60, 61, 62, 64, 65, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 82, 83), nSmGrps = 37, # from winbugs file 'FBK 4km - data - covars' # columns # 1. RegionIndex, # 2 SoCal, # 3 CenCal, # 4 NoCal, # 5 ORWA, # 6 Year, # 7 YrTrend (year - 1991 + 1) # 8 YrIndex (1 = 1991, 2 = 1993, 3 = 1996, 4 = 2001, 5 = 2005, 6 = 2008 # 9 dv91, # 10 dv93, # 11 dv96, #12 dv01, # 13 dv05, # 14 dv08, # 15 shipMAC # 16 shipDSJ, # 17 shipMc2, # 18 Cue, # 19 Bino, # 20 SwellHt # 21 RainFog, # 22 Glare, # 23 Closing, # 24 Beauf, # 25 Vis, # 26 vis.adj, covars = t(structure( .Data = c( 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,6,0,4,0,0,1,4,8,6, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,6,1,4,0,0,1,4,8,6, 2,0,1,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,6,0,4,1,1,1,2,2,2, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,3,0,1.5,1,0,1,0,7,6, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,6,0,2.5,0,0,1,1,8,6, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,3,0,3,0,1,1,3,10,6, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,6,0,3,0,1,1,2,10,6, 1,1,0,0,0,1991,1,1,1,0,0,0,0,0,1,0,0,3,0,3,0,1,1,2,8,6, 1,1,0,0,0,1991,1,1,1,0,0,0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