Using balanced acceptance sampling as a master sample for environmental surveys

Well‐designed environmental monitoring programmes for management organisations are important for evidence‐based decision making. However, many environmental problems are not single agency issues that require intervention or monitoring at one spatial scale. A master sample can be used to coordinate and scale monitoring designs to ensure consistency in information gathered and robustness of estimators at the different spatial scales. We propose using balanced acceptance sampling (BAS) to generate a master sample. In this context, practical applications and justification of BAS as a master sample are addressed. These include sample generation, stratification, unequal probability sampling, rotating panel designs, and regional intensification. A method for incorporating legacy sites is also provided. Using BAS as a master sample is conceptually simple, gives good spatial balance over different spatial scales, and is computationally efficient to generate. An example for terrestrial biodiversity monitoring in New Zealand is provided. Environmental monitoring can benefit from increased coordination between agencies. A master sample is an excellent way to incorporate coordination directly into the sample design. BAS improves on methods previously described and provides an effective method to monitor populations at multiple spatial scales.


| INTRODUC TI ON
Environmental management agencies rely on the results of monitoring to answer questions about the success of their policies and programmes. Monitoring is often designed to address information needs for a particular site or small set of sites. If the study is poorly designed, it can fail to provide meaningful data to inform management and policy decision making (Field, O'Connor, Tyre, & Possingham, 2007;Legg & Nagy, 2006;Nichols & Williams, 2006). Extrapolating from these studies to answer larger scale questions can bias the estimates as single sites are rarely representative of a broader region (Dixon, Olsen, & Kahn, 1998;Peterson, Urquhart, & Welch, 1999).
Monitoring objectives and sample areas of national, regional, and local agencies often overlap creating efficiencies if the different groups coordinate their effort. Coordinating requires consistent formulation of goals and objectives, selection of indicators and measures, field protocols and sample design (Larsen, Olsen, & Stevens, 2008;Fancy, Gross, & Carter, 2009;Reynolds, Knutson, Newman, Silverman, & Thompson, 2016). If one agency establishes monitoring locations using standard methods and sample design, others can use that data for their own purposes, reducing the need to establish more monitoring. By agencies working together and through a well set out design process, as described in Reynolds et al. (2016), the chances of monitoring being successful are higher and concerns about extrapolating estimates from disparate data sources are also reduced.
One way to coordinate sample design is to develop a master sample; a set of points that can be subsampled for different monitoring activities. This was first proposed by King (1945), but only recently has been introduced to environmental monitoring (Larsen et al., 2008;Theobald, 2016) with implementation in the Pacific Northwest of the United States. Different studies drawing samples from the master sample enhances collaboration within and between agencies to reduce duplication of effort. Additionally, consistent sample design has benefits when making estimates using data from multiple sources. Similar to providing standard field methods, the master sample provides standardised locations for sampling that ensures objective, unbiased estimation of the population parameters of interest.
The coordinating body requires the user to define the objectives and sample frame clearly before gaining access to the sample points.
The sampling method chosen should be flexible enough for a variety of users and study designs to be effective for coordination.
Monitoring can take place on different spatial scales such as a national monitoring programme or a local one investigating the impact of management action. When designing an individual study, identifying heterogeneity and using stratification (Yoccoz, Nichols, & Boulinier, 2001) or unequal probability sampling (Stevens, 1997) can produce more precise estimates. The study may need a unique balance of status and trend estimation which can be done by defining panels that have different revisit schema (McDonald, 2003;Skalski, 1990;Stevens & Olsen, 1999). In all these cases, the subsamples used should be unbiased and representative.
There are many ways to generate effective samples which could be used to coordinate monitoring. A simple random sample is unbiased but is less efficient than spatially balanced designs in the presence of spatial autocorrelation (Cochran, 1946;Grafström & Lundström, 2013). A design is spatially balanced if the sample is well-spread over the population -a sample with few clumps and voids. A systematic sample can be considered near perfect spatial balance but is less flexible to changes in sample size making it a poor choice. Stevens and Olsen (2004) introduced generalised random tessellation stratified (GRTS) design, a spatially balanced design that is frequently used in environmental monitoring (Collier & Olsen, 2013;Fancy et al., 2009;Thompson, Miller, Mortenson, & Woodward, 2011). Generalised random tessellation stratified hierarchically orders a population using a base four numbering scheme and then selects a systematic sample from the ordered population. There is also the Local Pivotal Method (LPM) (Grafström, Lundström, & Schelin, 2012). LPM iteratively updates each sampling unit's inclusion probability in a way that makes it very unlikely to include neighbouring units in a sample. Once n units have an inclusion probability of one, the sample is released. Although the spatial balance of LPM is better than GRTS, it is computationally prohibitive on large populations. For large populations, Grafström, Saarela and Ene (2014) introduced a new rapid implementation of LPM, called suboptimal LPM. LPM has better spatial balance, but suboptimal LPM is computationally feasible on large populations. Another spatially balanced design is balanced acceptance sampling (BAS) (Robertson, Brown, McDonald, & Jaksons, 2013). It uses a quasi-random number sequence to generate spatially balanced points.
Similar to GRTS, the outcome of the sequence is an ordered set of points such that any contiguous subsample maintains spatial balance.
Generalised random tessellation stratified design has been used to generate environmental monitoring master samples (Larsen et al., 2008). The design is particularly useful for generating master samples because GRTS points are ordered using a reverse hierarchical ordering strategy that ensures that all contiguous subsamples are also spatially balanced (Stevens & Olsen, 2004). By taking a large GRTS oversample, an ordered master sample can be obtained from which spatially balanced subsamples can be drawn. However, once an oversample is chosen, it is not possible to generate additional points and this needs to be accounted for at the planning stage. Theobald (2016) also uses an adaptation of GRTS, Reversed Randomised Quadrant-Recursive Raster (RRQRR), implemented in ArcGIS software (Theobal d et al ., 2007) to coordinate monitoring effort. The authors' are not aware of an ordering strategy for the LPM methods and hence, it is not clear how these methods could be used for oversampling. BAS, similar to GRTS, creates an ordered set of points such that any contiguous subsample maintains spatial balance. To generate a master sample with BAS, a random-start is chosen and after that an infinite set of points exist for the sample.
Hence, the oversample size does not need to be specified.
The purpose of this paper is to develop a master sample for environmental monitoring with a focus on terrestrial sampling of an area frame in which all subregions have positive area. We investigate using BAS to generate a master sample; how the points will be generated and then used in a wide variety of ways. These include adapting to different spatial scales, stratification and unequal probability sampling, changes in boundaries or resources, revisitation structure (panel design) and how to include legacy monitoring programmes. We then provide an example for how this could be applied to coordinate biodiversity monitoring at the regional and national level in New Zealand.

| Point selection
Two-dimensional BAS points are drawn from a random-start Halton The ith coordinate of each point in the sequence has an associated base b i , with b 1 = 2 and b 2 = 3. The ith coordinate of the kth point in this sequence is (Robertson, McDonald, Price, & Brown, 2017) where u i is a random non-negative integer and ⌊x⌋ is the floor function -the largest integer that is less than or equal to x. For example, the first coordinate of the second point with u 1 = 1 and b 1 = 2 is The two-dimensional random-start Halton sequence is Setting u 1 = u 2 = 0 gives the classical two-dimensional Halton sequence (Halton, 1960).
The points from Equation 1 are then scaled to a minimal bounding box enclosing the study area. If x 1 is not in the study area, new sequences are considered until one with x 1 in the study area is found (Robertson et al., 2017). Starting from x 1 , the first n scaled points in the study area define the BAS sample (Robertson et al., 2017). The BAS points are kept in the same order as they appear in Equation 1 and will have good spatial spread over the study area. Furthermore, any contiguous subset of the BAS sample will also have good spatial spread (Robertson et al., 2017).
The random integer vector in the sequence u = (u 1 , u 2 ) is chosen so that 0 ≤ u i ≤ 10 7 . This gives ≈ λ10 14 possible BAS samples of size n, where λ is the fraction of the bounding box occupied by the study area. By ensuring the random start comes from a large set of integers, the BAS points are uniformly distributed (Robertson et al., 2013). Once the random-start is selected an infinite number of BAS points exist over the study which constitutes the master sample. Higher dimensional points can be defined by using different co-prime bases for each additional dimension (e.g. b 3 = 5 when sampling from a [0,1) 3 ).

| Spatial scales
The master sample should work at different spatial scales to address national, regional, and local objectives. Let A be a measurable subset of the study area for which the master sample is defined. Because Wang & Hickernell, 2000) and A is measurable, there exists a subsequence is a BAS sample of size n drawn from A, with its random start and bounding box defined by the master sample. Hence, BAS samples can be drawn from the master sample at any spatial scale within the study area of the master sample. This also means that a national sample can share points with monitoring at the local level (see Section 2.4).

| Stratification and unequal probability
Stratification with the master sample is essentially the same as taking a subsample for a specific measurable subset of the study area as described above. The ith stratum (measurable) has a subsequence , where n i is the sample size required.
Hence, each stratum has its own BAS sample with its random start and bounding box defined by the master sample.
If unequal probability sampling is required, a third dimension is added to the bounding box. This extra dimension allows BAS to sample from an arbitrary inclusion density function π(x) using an acceptance/rejection sampling strategy (Robertson et al., 2013).
where α is the maximum value of π(x). The impact of this is that some of the master sample points in Equation 1 will be skipped. Skipping points in Equation 1 changes the distribution of points in each BAS sample, with fewer points being drawn from areas where π(x) is low.

| Changing boundaries and resources
For long-term monitoring programmes, the boundaries of study regions may change over time. This is easy to accommodate with the master sample, provided the changes are within the initial bounding box. Let A be a measurable study area whose boundaries changed, de-

| Panel design
In environmental surveys that are repeated through time, some samples may be visited more frequently than others. Estimates of status and/or trend can be improved by balancing the number of new points sampled each year with repeated sampling on existing points (Urquhart & Kincaid, 1999 , for panel 2 we use {z j } n 1 +n 2 j=n 1 +1 and so on, where n i is the sample size for the ith panel. Defining panels in this way ensures that both the overall sample and each panel's sample are BAS designs. If additional points are needed after a full rotation, they are taken from the unsampled points in the master sample in the order that they appear. Note, when this occurs each panel may not be a true BAS sample but as shown in the legacy monitoring simulation below, adding BAS points to an existing sample does not significantly impact estimation and the sample will still be equi-probable and give unbiased estimators. If budgets change, points should be removed by last in, first out. Table 1 shows an example panel design.

| Incorporating legacy monitoring
A master sample is intended for coordinating large-scale monitoring. Often, there is legacy monitoring that may already be well designed and this should be accommodated. We will consider two different types of legacy monitoring designs: simple random sampling (SRS) and random-start systematic sampling (SS). These are equi-probable designs, where each sampling unit has an equal chance of being included in a sample. If the existing monitoring is insufficient, the BAS master sample can be used to draw additional units from the area. We consider two types of sample augmentation. In both cases, we assume n l legacy units were originally sampled with equal inclusion probabilities from a population of N units, and that these will be augmented by n b additional units. The first augmentation method we consider removes legacy units, draws a regular BAS sample from the remainder, and includes both legacy and augmented units in the sample. In this case, we assume that the total sample arose jointly from a single sampling operation and hence, the inclusion probabilities for the legacy and augmented units are equal, π i = (n l + n b )∕N.
The second augmentation method we consider uses the unequal probability BAS sampling method described above to downweight units near legacy units (Foster et al., 2017). The method we employ increases the probability of inclusion smoothly with increasing distance D from legacy units. Following from Foster et al. (2017), we sample proportional to a Gaussian Kernel, where σ controls the area of influence around legacy units. It is necessary in this case to re-scale the inclusion probabilities so that they sum to n. We will call this second method of sample augmentation that utilises altered inclusion probabilities aBAS.
Spatially balanced designs use a local neighbourhood variance (LNV) estimator (Stevens & Olsen, 2003), but as the proportion of legacy units is increased the LNV tends to underestimate true variance (Foster et al., 2017). where � var(μ l ) is the Sen, Yates and Grundy variance estimate using the legacy units and � var(μ b ) is the LNV variance estimate using spatially balanced units.
A simulation study was carried out to investigate the different methods to incorporate legacy monitoring. The sampling frame was defined as a 100 × 100 raster in [0,1) 2 and an estimate of the population mean and standard error was sought. The response value for each raster cell was defined as the integral of f(x) over the cell. Three different functions were considered to define the population, a strong spatial trend (Robertson et al., 2013;Grafström et al., 2012), the Peak function, and the Bird function.
These functions are given in the online supplementary material section. Scenarios similar to Foster et al. (2017) using the program r (R Core Team, 2015) were run. We used an overall sample size of n = 60 and a number of legacy units (n l ∈ 3,4, … ,57) were generated either as SRS or SS. More units (n b = 60 − n l ) were generated using GRTS (Kincaid & Olsen, 2016), BAS, aBAS (Foster, 2016) and SRS to achieve the full sample size of n = 60. Each scenario was run 1,000 times. When estimating the standard error of SS legacy units, we used SRS estimators, which provides conservative estimates in the presence of spatial autocorrelation (Aune-Lundberg & Strand, 2014;Strand, 2017). A detailed description of The results of the simulation can be seen in Figure 2. In all cases, adding some spread to the points improved precision over using SRS.
aBAS performed the best when SRS legacy units were used, but had similar performances to BAS and GRTS for SS. The SS legacy units already had good spread and aBAS was not necessary to force better overall spatial balance. Population 3 has periodic structure, which made systematic sampling perform poorly because the spread of the

| APPLI C ATI ON: NE W ZE AL AND TERRE S TRIAL MONITORING
The New Zealand (NZ) Department of Conservation (DOC) is the lead biodiversity management agency in NZ, responsible for managing ≈30% of NZ as public conservation land (PCL). Development of a national monitoring system has exposed the challenges in coordinating monitoring design to provide results meaningful at a local, regional and national scale. Increasingly partner environmen- At ATNP, one of the key targets is focussed on bird abundance and distribution through the park. A sample size of n = 65 was chosen based on a precision analysis using simr (Green & MacLeod, 2016) and historical bird count data from an existing intensively monitored site which showed that temporal variation was less than spatial. Therefore, 15 points were selected to be measured annually and the other 50 on a    In the first year, panels 1 and 2 would be measured. Blue points are master sample points measured by a national Ecosystem Management Unit monitoring programme that employs the master sample (National MS), see Figure 3. The red points are from the 8-km systematic National Level Monitoring programme (NLM). The black points are the locally augmented sampling units generated from the master sample (Local MS). This design gives excellent spatial coverage over the park each year (n = 25) and over a 5-year period (n = 65) The master sample above is entirely defined by the seed u and the bounding box. Hence, there is no need for a repository to hold the coordinates. Computationally the master sample is easy to run on the fly. Generating 65 points for ATNP in Figure 4 takes ≈0.5 s on a desktop computer. See supplementary materials for r script to generate a master sample in NZ.

| D ISCUSS I ON
A master sample can be a useful tool to organise environmental monitoring at different spatial scales as previously done using GRTS or RRQRR (Larsen et al., 2008;Theobald, 2016). Using BAS instead of GRTS gives better spatial balance (Robertson et al., 2013) and no need for an oversample. It is also possible to add an extra dimension for unequal probability sampling leading to an overall more flexible design. Not requiring an oversample to create a master sample using BAS means that it will remain relevant to any scale that monitoring takes place no matter how localised. BAS can be used for sampling three-dimensional space (Robertson et al., 2013) which generalises the concepts presented here to work for atmospheric or oceanic monitoring.
Previous master samples rely on large source files for point coordinates. BAS does not because it is deterministic once the random seed is chosen. Generating a BAS master sample in r is computationally quick and easy to program making it possible for a user to run a function in r (see supplementary online material section) to sample a chosen region from a shape file. By making use of the deterministic nature of the Halton sequence and Halton boxes (Robertson et al., 2017) the the code can be made computationally efficient for any set of shape files and sample sizes required.
In our experience, any large-scale long-term monitoring will need to incorporate already existing monitoring programmes that are proven effective. This was a requirement in developing a master sample for NZ. We have shown that there is no major issue with incorporating legacy monitoring into the design but recommend that the sample is rigorously vetted to ensure no known biases are included, for example, the legacy monitoring is a judgement sample. Using panel designs can help incorporate the already existing visitation schedule of the legacy units into an efficient monitoring design. By generating the master sample independently of the legacy monitoring it is possible that a legacy unit and master sample unit could be close in space, in this case both units still need to be measured.
The master sample helps coordinate the points sampled for environmental surveys. Every survey at the local and national level should still go through rigorous design. This means defining the objectives of monitoring clearly and the methods to use so that they are consistent with standard methodology as required by the objective. By following the steps outlined in Reynolds et al. (2016) and using the master sample for point generation, we believe that the monitoring programmes undertaken at all levels will have improved efficiency and contribute to the overall knowledge of the population of interest.

ACK N OWLED G EM ENTS
This research was funded by the Department of Conservation in New Zealand. We thank Elaine Wright for her support and Tony Olsen, Scott Foster and Amy Hawcroft for their advice.

AUTH O R S' CO NTR I B UTI O N S
All authors had significant contributions to this research. The paper was initiated by a requirement from the Department of Conservation (DOC) for coordinated monitoring of ecosystems at the national level. This work fell directly to O.G. and P.v.D.-B. who collaborated with B.R. We were funded as salary through our roles at DOC and the University of Canterbury.

DATA ACCE SS I B I LIT Y
We present a maintained version of the r code to generate a master sample in New Zealand, including a shape file example on GitHub for access to readers familiar with r https://doi.org/10.5281/zenodo.