Creates a description of a survey design. Designs may use different types of either point or line transect designs across strata but cannot mix point and line transect design types within a single design object.
Usage
make.design(
region = make.region(),
transect.type = "line",
design = "systematic",
samplers = numeric(0),
line.length = numeric(0),
seg.length = numeric(0),
effort.allocation = numeric(0),
design.angle = 0,
spacing = numeric(0),
edge.protocol = "minus",
seg.threshold = numeric(0),
bounding.shape = "rectangle",
truncation = 50,
coverage.grid = NULL
)
Arguments
- region
an object of class Region defining the survey region.
- transect.type
character variable specifying either "line" or "point"
- design
a character variable describing the type of design. Either "random", "systematic", "eszigzag" (equal-spaced zigzag), "eszigzagcom" (equal spaced zigzag with complementary lines) or "segmentedgrid". See details for more information.
- samplers
the number of samplers you wish the design to generate (note that the number actually generated may differ slightly due to the shape of the study region for some designs). This may be one value or a value for each stratum.
- line.length
the total line length you desire or a vector of line lengths the same length as the number of strata.
- seg.length
the length of the line transect segments for a segmented grid design.
- effort.allocation
Used for multi-strata regions where only a total effort value is provided. This numeric argument should have one value per stratum indicating the proportion of the total effort to allocate to that stratum. If length is 0 (the default) and only a total line length or total number of samplers is supplied, effort is allocated based on stratum area.
- design.angle
numeric value detailing the angle of the design. Can provide multiple values relating to strata. The use of the angle varies with design, it can be either the angle of the grid of points, the angle of lines or the design axis for the zigzag design. See details. In addition, a value of -1 will cause a random design angle to be generated.
- spacing
used by systematic designs, numeric value(s) to define spacing between transects. Can be a vector of values with one value per stratum.
- edge.protocol
character value indicating whether a "plus" sampling or "minus" sampling protocol is used. See details.
- seg.threshold
this is a percentage threshold value applicable to segmented grid designs controlling which partial segments are discarded around the survey region boundary. By default, the value of 50, means that only segments that are more than half inside the survey region will be retained. To retain all segments, no matter how small they are when clipped to the survey region boundary set this value to 0.
- bounding.shape
only applicable to zigzag designs. A character value saying whether the zigzag transects should be generated using a minimum bounding "rectangle" or "convex.hull". The default is a minimum bounding rectangle.
- truncation
A single numeric value describing the longest distance at which an object may be observed. Truncation distance is constant across strata.
- coverage.grid
An object of class Coverage.Grid for use when running the coverage simulation.
Value
object of a class which inherits from class Survey.Design either Line.Transect.Design or Point.Transect.Design
Details
Plus versus Minus Sampling If you choose for your design to use a minus sampling strategy then transects will only be generated within the survey region and will give lower coverage around the edge of the survey region. Plus sampling generates transects within an area greater than the study region. To do this dssd first puts a buffer around the study region before generating the transects within the buffered region. The width of the buffer is the truncation distance supplies by the user. Plus sampling helps to ensure more even coverage around the edge of the study area. See Buckland et. al, 2001 "Introduction to Distance Sampling" for information on when to use plus versus minus sampling.
Point Transect Designs For point transect designs the user may either specify "random" or "systematic" for the design argument. If the user specifies "random", they should also provide a value for effort detailing the number of point transects they wish their survey to have. For stratified designs they may specify a vector of numbers detailing the number of transects per strata or alternatively use the effort.allocation argument to allocate a total effort amount proportionally. If effort.allocation is left blank then effort will be allocated according to strata area. If the user specified"systematic" they may either provide their desired number of samplers or a value for spacing which defines the gap between each of the points (again a vector of spacing values can be provided for each strata). Optionally the user may select a design.angle. For both random and systematic point transect designs the user may select either a minus or plus sampling edge protocol.
Line Transect Designs: For line transect designs the user may either specify "random" (randomly placed full width lines), "systematic" (systematically placed full width lines), "eszigzag" (equally spaced zigzag lines), "eszigzagcom" (two sets of complementary equally spaced zigzag lines) or "segmentedgrid" (a grid of short line transect segments). Note that users may also select a "segmentedtrack" design but dssd does not generate transects from this design. This addition was made so that simulations can be run from Distance for Windows using this design. In this case, the transect shapefiles will be generated by Distance for Windows for use in the simulation. dssd provides this design as an option to allow the design specifications to be stored within the simulation.
If the user specifies a "random" design, they should provide the either the number of samplers they wish the design to generate or the line length they wish to achieve, either by strata or as a total. If the user specifies "systematic" they should specify either the number of samplers, the desired line length or the spacing between lines. The design angle for these parallel line designs refers to the angle of the lines where 0 is a vertical line and moving round in a clockwise direction. If the user specifies a zigzag design they should specify the systematic spacing value, number of samplers or line length to be used and should choose between generating the design in a minimum bounding rectangle or a convex hull. The default is minimum bounding rectangle which gives more even coverage but the convex hull is generally more efficient. A segmented grid design may be generated using the either the number of samplers or total line length, combined with a value for segment length. Alternatively the user may specify a values for spacing and segment length. The segmented grid design also uses the segment threshold argument. All the designs may be generated using plus or minus sampling protocols. Similar to the point transect designs different values may be specified for each strata for all of the above options. The design angle for the zigzag designs refers to the angle of a line which would run through the middle of each zigzag transect if the zigzags were to be generated within a rectangle. The design angle for zigzags should usually run along the longest dimension of the study region. A segmented trackline design requires the same specified values as the segmented grid design.
NOTE: If multiple global design effort arguments are supplied (i.e. spacing, samplers, line.length) then only the first of spacing then line.length then number of samplers will be used. The other values provided will be discarded. Different design effort arguments may supplied for different strata. This is achieved by supplying vectors of numeric values for each of the desired effort measures, there should be 1 value for each stratum. A value indicates the effort for that stratum and NA's should be used to ensure that only one measure of effort is defined for each stratum.
Effort Allocation: For multi-strata designs users are able to define a single global effort value, for example number of samplers or line length, and allocate proportions of it to each stratum using the effort.allocation argument. If a global effort value is supplied and effort.allocation is not defined then effort is assigned based on stratum area. This should lead to a design which is at least approximately equal effort across strata. In the case where all strata use the same systematic design then in the absence of effort.allocation the spacing will be calculated globally and exactly equal effort will be achieved. In the case where different designs are chosen for different strata or a non-systematic design is selected then effort and spacing values will be calculated at the stratum level and this can lead to some variations in coverage between strata.
See the Getting Started Vignette and the Multiple Strata in dssd Vignette for example designs.
Examples
#Point transect example
shapefile.name <- system.file("extdata", "TrackExample.shp", package = "dssd")
region <- make.region(region.name = "study area",
shape = shapefile.name)
# \donttest{
# Generate coverage grid (spacing quite sparse for speed)
cover <- make.coverage(region,
n.grid.points = 250)
# Define design
design <- make.design(region = region,
transect.type = "point",
design = "random",
samplers = 25,
design.angle = 45,
edge.protocol = "minus",
truncation = 3,
coverage.grid = cover)
# Generate a single survey instance
survey <- generate.transects(design)
plot(region, survey, covered.area = TRUE)
# Note, the number of reps here has been set to 5 to avoid lengthy run-times,
# however, the reps should be at least 100 for an idea of design statistics
# (i.e. trackline lengths) and 500 + to give a good odea of coverage.
design <- run.coverage(design, reps = 5)
#>
20% complete
#>
40% complete
#>
60% complete
#>
80% complete
#>
100% complete
# Plot the coverage
plot(design)
# Display the design statistics
design
#>
#> Strata study area:
#> ___________________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata areas: 12037
#> Coverage Simulation repetitions: 5
#>
#> Number of samplers:
#>
#> study area Total
#> Minimum 25 25
#> Mean 25 25
#> Median 25 25
#> Maximum 25 25
#> sd 0 0
#>
#> Covered area:
#>
#> study area Total
#> Minimum 661.68 661.68
#> Mean 680.77 680.77
#> Median 682.79 682.79
#> Maximum 705.67 705.67
#> sd 18.36 18.36
#>
#> % of region covered:
#>
#> study area Total
#> Minimum 5.50 5.50
#> Mean 5.66 5.66
#> Median 5.67 5.67
#> Maximum 5.86 5.86
#> sd 0.15 0.15
#>
#> Coverage Score Summary:
#>
#> study area Total
#> Minimum 0.00000000 0.00000000
#> Mean 0.05390625 0.05390625
#> Median 0.00000000 0.00000000
#> Maximum 0.40000000 0.40000000
#> sd 0.10803220 0.10803220
#Extract coverage scores
coverage.scores <- get.coverage(design)
hist(coverage.scores)
#Multi-strata line transect example
shapefile.name <- system.file("extdata", "AreaRProjStrata.shp", package = "dssd")
region <- make.region(region.name = "study area",
strata.name = c("North", "NW", "West Upper",
"West Lower", "SW", "South"),
shape = shapefile.name)
plot(region)
# Make a coverage grid
cover <- make.coverage(region,
n.grid.points = 500)
# Define the design
design <- make.design(region = region,
transect.type = "line",
design = c("systematic", "systematic",
"eszigzag", "systematic",
"systematic", "eszigzagcom"),
line.length = 5000*1000, #5000km x 1000m (projection in m)
design.angle = c(160, 135, 170, 135, 50, 60),
edge.protocol = "minus",
truncation = 3000,
coverage.grid = cover)
# Create a single set of transects to check
survey <- generate.transects(design)
plot(region, survey, covered.area = TRUE)
# Note, the number of reps here has been set to 5 to avoid lengthy run-times,
# however, the reps should be at least 100 for an idea of design statistics
# (i.e. trackline lengths) and 500 + to give a good odea of coverage.
design <- run.coverage(design, reps = 5)
#>
20% complete
#>
40% complete
#>
60% complete
#>
80% complete
#>
100% complete
# Plot the coverage
plot(design)
# Display the design statistics
design
#>
#> Strata North:
#> ______________
#> Design: systematically spaced transects
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 160
#> Edge protocol: minus
#>
#> Strata NW:
#> ___________
#> Design: systematically spaced transects
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 135
#> Edge protocol: minus
#>
#> Strata West Upper:
#> ___________________
#> Design: equal spaced zigzag
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 170
#> Edge protocol: minus
#>
#> Strata West Lower:
#> ___________________
#> Design: systematically spaced transects
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 135
#> Edge protocol: minus
#>
#> Strata SW:
#> ___________
#> Design: systematically spaced transects
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 50
#> Edge protocol: minus
#>
#> Strata South:
#> ______________
#> Design: complementaty equal spaced zigzags
#> Spacing: NA
#> Number of samplers: NA
#> Line length: 5e+06 (shared across strata)
#> Design angle: 60
#> Edge protocol: minus
#>
#> Strata areas:
#> 4176461143, 8180996497, 6316380968, 8188111047, 2654685511, 9291229356
#> Region and effort units: m
#> Coverage Simulation repetitions: 5
#>
#> Number of samplers:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 14 21.0 21.0 26.0 9.0 32.0 124.0
#> Mean 14 21.6 21.4 26.4 9.6 33.0 126.0
#> Median 14 22.0 21.0 26.0 10.0 33.0 126.0
#> Maximum 14 22.0 22.0 27.0 10.0 34.0 128.0
#> sd 0 0.5 0.5 0.5 0.5 0.7 1.6
#>
#> Covered area:
#>
#> North NW West Upper West Lower SW South
#> Minimum 3034823885 6059810345 4441019362 6028820738 1762759745 6309544905
#> Mean 3059365972 6110161361 4461527126 6071463153 1848378046 6380492116
#> Median 3057089807 6106508013 4464959130 6081517959 1833225173 6346877529
#> Maximum 3083493811 6141955711 4471324057 6121378923 1934331922 6464092057
#> sd 18016159 33132165 12038709 39787785 69295360 71655250
#> Total
#> Minimum 27716323588
#> Mean 27931387774
#> Median 28007239298
#> Maximum 28021667931
#> sd 131008009
#>
#> % of region covered:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 72.66 74.07 70.31 73.63 66.40 67.91 71.42
#> Mean 73.25 74.69 70.63 74.15 69.63 68.67 71.97
#> Median 73.20 74.64 70.69 74.27 69.06 68.31 72.17
#> Maximum 73.83 75.08 70.79 74.76 72.86 69.57 72.21
#> sd 0.43 0.40 0.19 0.49 2.61 0.77 0.34
#>
#> Line length:
#>
#> North NW West Upper West Lower SW South
#> Minimum 534618.22 1044477.47 791051.45 1052768.57 326661.1 1087659.75
#> Mean 542935.86 1052737.85 794278.08 1057498.08 342508.7 1095068.02
#> Median 545135.54 1050067.28 794983.97 1054654.73 346514.9 1089424.12
#> Maximum 548305.72 1062836.46 797772.63 1065229.53 357747.1 1108269.99
#> sd 5530.66 7034.49 2584.31 5668.67 12582.5 9515.72
#> Total
#> Minimum 4852182.41
#> Mean 4885026.61
#> Median 4893903.58
#> Maximum 4904042.82
#> sd 20144.78
#>
#> Trackline length:
#>
#> North NW West Upper West Lower SW South
#> Minimum 799255.88 1379361.56 1003363.93 1417937.7 481282.29 1324684.57
#> Mean 806876.02 1382761.46 1012437.32 1441901.0 517554.05 1348578.88
#> Median 804319.51 1382744.10 1006492.34 1445186.3 522723.76 1353670.21
#> Maximum 818091.98 1386526.71 1036694.40 1454046.7 555234.54 1361077.43
#> sd 7197.55 2548.56 13861.93 14139.2 27435.01 14901.73
#> Total
#> Minimum 6459837.48
#> Mean 6510108.75
#> Median 6506027.42
#> Maximum 6548863.46
#> sd 35285.23
#>
#> Cyclic trackline length:
#>
#> North NW West Upper West Lower SW South
#> Minimum 901502.23 1537520.28 1162583.05 1616503.66 553683.70 1345354.15
#> Mean 909032.48 1543591.91 1175356.45 1642472.83 585297.21 1370946.27
#> Median 906577.79 1544417.54 1173638.29 1643652.41 585272.03 1375398.41
#> Maximum 920493.75 1550023.37 1194646.56 1657859.38 625281.23 1385767.22
#> sd 7337.27 5700.96 13186.05 16111.73 26044.88 16115.69
#> Total
#> Minimum 7193335.49
#> Mean 7226697.17
#> Median 7225768.31
#> Maximum 7254673.04
#> sd 27540.41
#>
#> Coverage Score Summary:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 0.0000000 0.2000000 0.2000000 0.2000000 0.4000000 0.0000000 0.0000000
#> Mean 0.7127273 0.7648148 0.7341772 0.7714286 0.7117647 0.6789916 0.7316000
#> Median 0.8000000 0.8000000 0.8000000 0.8000000 0.7000000 0.8000000 0.8000000
#> Maximum 1.0000000 1.0000000 1.2000000 1.0000000 1.0000000 1.2000000 1.2000000
#> sd 0.2269398 0.1518206 0.2189052 0.1949923 0.1854801 0.2993988 0.2251729
# Extract coverage scores for the first strata
coverage.scores <- get.coverage(design, strata.id = 1)
summary(coverage.scores)
#> Min. 1st Qu. Median Mean 3rd Qu. Max.
#> 0.0000 0.6000 0.8000 0.7127 0.8000 1.0000
# }
# Fast running example for CRAN testing purposes
# This spacing is too sparse to assess coverage in a real example and
# the number of repetitions is too low to assess design statistics
cover <- make.coverage(region,
n.grid.points = 50)
design <- make.design(region = region,
transect.type = "point",
design = "random",
samplers = 25,
design.angle = 45,
edge.protocol = "minus",
truncation = 3,
coverage.grid = cover)
survey <- generate.transects(design)
plot(region, survey, covered.area = TRUE)
design <- run.coverage(design, reps = 3)
#>
33.3% complete
#>
66.7% complete
#>
100% complete
plot(design)
design
#>
#> Strata North:
#> ______________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata NW:
#> ___________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata West Upper:
#> ___________________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata West Lower:
#> ___________________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata SW:
#> ___________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata South:
#> ______________
#> Design: randomly located transects
#> Number of samplers: 25 (shared across strata)
#> Design angle: 45
#> Edge protocol: minus
#>
#> Strata areas:
#> 4176461143, 8180996497, 6316380968, 8188111047, 2654685511, 9291229356
#> Region units: m
#> Coverage Simulation repetitions: 3
#>
#> Number of samplers:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 3 5 4 5 2 6 25
#> Mean 3 5 4 5 2 6 25
#> Median 3 5 4 5 2 6 25
#> Maximum 3 5 4 5 2 6 25
#> sd 0 0 0 0 0 0 0
#>
#> Covered area:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 84.78 141.31 113.05 141.31 56.52 169.57 706.54
#> Mean 84.78 141.31 113.05 141.31 56.52 169.57 706.54
#> Median 84.78 141.31 113.05 141.31 56.52 169.57 706.54
#> Maximum 84.78 141.31 113.05 141.31 56.52 169.57 706.54
#> sd 0.00 0.00 0.00 0.00 0.00 0.00 0.00
#>
#> % of region covered:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 0 0 0 0 0 0 0
#> Mean 0 0 0 0 0 0 0
#> Median 0 0 0 0 0 0 0
#> Maximum 0 0 0 0 0 0 0
#> sd 0 0 0 0 0 0 0
#>
#> Coverage Score Summary:
#>
#> North NW West Upper West Lower SW South Total
#> Minimum 0 0 0 0 0 0 0
#> Mean 0 0 0 0 0 0 0
#> Median 0 0 0 0 0 0 0
#> Maximum 0 0 0 0 0 0 0
#> sd 0 0 0 0 0 0 0