DistanceDevelopment / dssd

Distance Sampling Survey Design
1 stars 1 forks source link

How to easily specify a equal effort allocation design? #54

Closed erex closed 3 years ago

erex commented 4 years ago

dssd produces an allocation of effort that is equal (by covered area percentage) across strata in a default manner. image

I am suspicious that users are incorrectly assuming that setting the argument line.length to a single value will produce an equal effort design.

What happens when a vector is provided to line.length?

How does line.length and effort.allocation interact?

None of example code in documentation shows the existence of the effort.allocation argument.

erex commented 4 years ago

Interaction of spacing and effort.allocation

It appears spacing over-rides effort.allocation, but initial summaries are confusing:

> spacing.unequal <- make.design(region = region,
+                     transect.type = "line",
+                     design = "systematic",
+                     spacing = c(100,500,200,300,600,900,400),
+                     #                      line.length = 5000*1000, #5000km x 1000m (projection in m)
+                     effort.allocation = rep(1/7, 7),
+                     design.angle = 0,
+                     edge.protocol = "minus",
+                     truncation = 25,
+                     coverage.grid = cover)
> conflict.spacing.effort <- run.coverage(spacing.unequal, reps=100)
  100% complete      
> conflict.spacing.effort

   Strata A:
   __________
Design:  systematically spaced transects
Spacing:  100

   Strata B:
   __________
Design:  systematically spaced transects
Spacing:  500

   Strata C:
   __________
Design:  systematically spaced transects
Spacing:  200

   Strata D:
   __________
Design:  systematically spaced transects
Spacing:  300

   Strata E:
   __________
Design:  systematically spaced transects
Spacing:  600

   Strata F:
   __________
Design:  systematically spaced transects
Spacing:  900

   Strata G:
   __________
Design:  systematically spaced transects
Spacing:  400

Strata areas:  
16154502, 85350714, 105536909, 168342906, 31700634, 14588755, 19672681
Effort allocation across strata: 
14.2857142857143%, 14.2857142857143%, 14.2857142857143%, 14.2857142857143%, 14.2857142857143%, 14.2857142857143%, 14.2857142857143
%
Coverage Simulation repetitions:  100

    Number of samplers:

           A    B    C    D    E   F    G Total
Minimum 75.0 27.0 83.0 84.0 12.0 7.0 18.0 307.0
Mean    75.6 27.0 83.2 84.8 12.4 7.1 18.8 309.0
Median  76.0 27.0 83.0 85.0 12.0 7.0 19.0 309.0
Maximum 76.0 28.0 84.0 85.0 13.0 8.0 19.0 311.0
sd       0.5  0.1  0.4  0.4  0.5 0.2  0.4   1.1

    Covered area:

                 A          B           C           D       E
Minimum 8017695.32 8494578.53 26295449.65 27912431.87 2597358
Mean    8034325.67 8515600.24 26327482.76 27996000.89 2629462
Median  8035786.28 8514585.76 26330437.47 27992609.63 2626726
Maximum 8050820.43 8544617.42 26363766.56 28057619.51 2658996
sd        10620.31   13050.97    21159.45    44797.17   21143
                F          G       Total
Minimum 751791.90 2432677.88 76598932.77
Mean    808053.71 2447331.64 76758257.37
Median  813078.82 2446391.11 76759664.92
Maximum 858688.97 2461407.66 76949322.60
sd       36946.11    7000.48    70260.36

    % of region covered:

            A     B     C     D    E    F     G Total
Minimum 49.63  9.95 24.92 16.58 8.19 5.15 12.37 17.36
Mean    49.73  9.98 24.95 16.63 8.29 5.54 12.44 17.39
Median  49.74  9.98 24.95 16.63 8.29 5.57 12.44 17.39
Maximum 49.84 10.01 24.98 16.67 8.39 5.89 12.51 17.44
sd       0.07  0.02  0.02  0.03 0.07 0.25  0.04  0.02

The inital effort allocation (14%) is not what was carried out. The Coverage proportion by region is consistent with the spacing argument, the effort.allocation argument appears to have been ignored.

LHMarshall commented 4 years ago

Setting line.length to a single value should produce an equal effort design... assuming the user hasn't over ridden it using spacing.

What happens when a vector is provided to line.length? dssd tries to create the requested line length in each stratum individually.

How does line.length and effort.allocation interact? Line length overrides effort allocation.

None of example code in documentation shows the existence of the effort.allocation argument. No, but I cannot put every combination in the example code. I could however expand the explanation in the Details section of the help file.

I also have further description currently in the strata example vignette

Screenshot 2020-11-17 at 01 02 27

Screenshot 2020-11-17 at 01 02 17

LHMarshall commented 4 years ago

Hmm I could also put in warnings to tell users which arguments are being ignored and also tidy up the design object to remove those arguments so the design summary accurately reflects the design. For example the following should have only retained the number of samplers argument.

> design <- make.design(transect.type = "line",
+                       design = "systematic",
+                       samplers = 10,
+                       line.length = 100)
> design

   Strata region:
   _______________
Design:  systematically spaced transects
Spacing:  NA
Number of samplers:  10  (shared across strata)
Line length:  100  (shared across strata)
Design angle:  0
Edge protocol:  minus

Strata areas:  1e+06
LHMarshall commented 3 years ago

A lot of work has been done on this prior to CRAN release 0.3.0 I will create a new issue to generate another vignette with more effort allocation examples.