Appendix H — Parameterizations
At the heart of SECR there is usually a set of three primary model parameters: one for population density () and two for the detection function. The detection function is commonly parameterized in terms of its intercept (the probability or cumulative hazard of detection for a detector at the centre of the home range) and a spatial scale parameter . Although this parameterization is simple and uncontroversial, it is not inevitable. Sometimes the biology leads us to expect a structural relationship between primary parameters. The relationship may be ‘hard-wired’ into the model by replacing a primary parameter with a function of other parameter(s). This often makes for a more parsimonious model, and model comparisons may be used to evaluate the hypothesized relationship. Here we outline some parameterization options in secr.
H.1 Theory
The idea is to replace a primary detection parameter with a function of other parameter(s) in the SECR model. This may allow constraints to be applied more meaningfully. Specifically, it may make sense to consider a function of the parameters to be constant, even when one of the primary parameters varies. The new parameter also may be modelled as a function of covariates etc.
H.1.1 and
One published example concerns compensatory heterogeneity of detection parameters (Efford and Mowat 2014). Combinations of and yield the same effective sampling area when the cumulative hazard of detection ()1 is a linear function of home-range utilisation. Variation in home-range size then has no effect on estimates of density. It would be useful to allow to vary while holding constant, but this has some fishhooks because computation of from and is not straightforward. A simple alternative is to substitute ; Efford & Mowat (2014) called the ‘single-detector sampling area’. If the sampling regime is constant, holding constant is almost equivalent to holding constant (but see Limitations). Fig. H.1 illustrates the relationship for 3 levels of .
H.1.2 and
Another biologically interesting structural relationship is that between population density and home-range size (Efford et al., 2016). If home ranges have a definite edge and partition all available space then an inverse-square relationship is expected or , where is a linear measure of home-range size (e.g., grid cell width) and is a constant of proportionality. In reality, the home-range model that underlies SECR detection functions does not require a hard edge, so the language of ‘partitioning’ and ‘elastic discs’ (Huxley, 1934) does not quite fit. However, the inverse-square relationship is empirically useful, and we conjecture that it may also arise from simple models for constant overlap of home ranges when density varies – a topic for future research. For use in SECR we equate with the spatial scale of detection , and predict concave-up relationships as in Fig. H.2.
The relationship may be modified by adding a constant to represent the lower asymptote of sigma as density increases ( ; by default in secr).
It is possible, intuitively, that once a population becomes very sparse there is no further effect of density on home-range size. Alternatively, very low density may reflect sparseness of resources, requiring the few individuals present to exploit very large home ranges even if they seldom meet. If density is no longer related to at low density, even indirectly, then the steep increase in modelled on the left of Fig. H.3 will ‘level off’ at some value of . We don’t know of any empirical example of this hypothetical phenomenon, and do not provide a model.
We use ‘primary parameter’ to mean one of ()2 For each relationship there is a primary parameter considered the ‘driver’ that varies for external reasons (e.g., between times, sexes etc.), and a dependent parameter that varies in response to the driver, moderated by a ‘surrogate’ parameter that may be constant or under external control. The surrogate parameter appears in the model in place of the dependent parameter. Using the surrogate parameterization is exactly equivalent to the default parameterization if the driver parameter(s) ( and for 3, for 4) are constant.
H.2 Implementation
Parameterizations in secr are indicated by an integer code (Table H.1). The internal implementation of the parameterizations (3)–(5) is straightforward. At each evaluation of the likelihood function:
- The values of the driver and surrogate parameters are determined
- Each dependent parameter is computed from the relevant driver and surrogate parameters
- Values of the now-complete set of primary parameters are passed to the standard code for evaluating the likelihood.
Code | Description | Driver | Surrogate(s) | Dependent |
---|---|---|---|---|
0 | Default | – | – | – |
3 | Single-detector sampling area | |||
4 | Density-dependent home range | , | ||
5 | 3 & 4 combined | , | , , | , |
The transformation is performed independently for each level of the surrogate parameters that appears in the model. For example, if the model includes a learned response a0 ~ b
, there are two levels of a0 (for naive and experienced animals) that translate to two levels of lambda0. For parameterization (4), . The factor of 100 is an adjustment for differing units (areas are expressed in hectares in secr, and 1 hectare = 10 000 ). For parameterization (5), is first computed from , and then is computed from .
H.2.1 Interface
Users choose between parameterizations either
- explicitly, by setting the ‘param’ component of the
secr.fit
argument ‘details’, or - implicitly, by including a parameterization-specific parameter name in the
secr.fit
model.
Implicit selection causes the value of details$param to be set automatically (with a warning).
The main parameterization options are listed in Table 1 (other specialised options are listed in Section H.5).
The constant in the relationship is set to zero and not estimated unless ‘c’ appears explicitly in the model. For example, model = list(sigmak ~ 1)
fixes c = 0, whereas model = list(sigmak ~ 1, c ~ 1)
causes c to be estimated. The usefulness of this model has yet to be proven! By default an identity link is used for ‘c’, which permits negative values; negative ‘c’ implies that for some densities (most likely densities outside the range of the data) a negative sigma is predicted. If you’re uncomfortable with this and require ‘c’ to be positive then set link = list(c = 'log')
in secr.fit
and specify a positive starting value for it in start
(using the vector form for that argument of secr.fit
).
Initial values may be a problem as the scales for a0 and sigmak are not intuitive. Assuming automatic initial values can be computed for a half-normal detection function with parameters and , the default initial value for is , and for , . If the usual automatic procedure (see ?autoini
) fails then ad hoc and less reliable starting values are used. In case of trouble, it is suggested that you first fit a very simple (or null) model using the desired parameterization, and then use this to provide starting values for a more complex model. Here is an example (actually a trivial one for which the default starting values would have been OK; some warnings are suppressed):
fit0 <- secr.fit(captdata, model = a0~1, detectfn = 'HHN',
trace = FALSE)
fitbk <- secr.fit(captdata, model = a0~bk, detectfn = 'HHN',
trace = FALSE, start = fit0)
H.2.2 Models for surrogate parameters a0 and sigmak
The surrogate parameters a0 and sigmak are treated as if they are full ‘real’ parameters, so they appear in the output from predict.secr
, and may be modelled like any other ‘real’ parameter. For example, model = sigmak ~ h2
is valid.
Do not confuse this with the modelling of primary ‘real’ parameters as functions of covariates, or built-in effects such as a learned response.
H.3 Example
Among the datasets included with secr, only ovenCH
provides a useful temporal sequence - 5 years of data from mistnetting of ovenbirds (Seiurus aurocapilla) at Patuxent Research Refuge, Maryland. A full model for annually varying density and detection parameters may be fitted with
msk <- make.mask(traps(ovenCH[[1]]), buffer = 300, nx = 25)
oven0509b <- secr.fit(ovenCH, model = list(D ~ session,
sigma ~ session, lambda0 ~ session + bk), mask = msk,
detectfn = 'HHN', trace = FALSE)
This has 16 parameters and takes some time to fit.
We hypothesize that home-range (territory) size varied inversely with density, and model this by fixing the parameter . Efford & Mowat (2014) reported for this dataset that did not compensate for within-year, between-individual variation in , but it is nevertheless possible that variation between years was compensatory, and we model this by fixing . For good measure, we also allow for site-specific net shyness by modelling with the builtin effect ‘bk’:
oven0509bs <- secr.fit(ovenCH, model = list(D ~ session, sigmak ~ 1,
a0 ~ bk), mask = msk, detectfn = 'HHN', trace = FALSE)
Warning: Using parameterization details$param = 5
The effect of including both sigmak and a0 in the model is to force parameterization (5). The model estimates a different density in each year, as in the previous model. Annual variation in drives annual variation in through the relation where (= sigmak/100) is a parameter to be estimated and the subscript indicates year. The detection function ‘HHN’ is the hazard-half-normal which has parameters and . We already have year-specific , and this drives annual variation in : where takes one of two different values depending on whether the bird in question has been caught previously in this net.
This is a behaviourally plausible and fairly complex model, but it uses just 8 parameters compared to 16 in a full annual model with net shyness. It may be compared by AIC with the full model (the model structure differs but the data are the same). Although the new model has somewhat higher deviance (1858.5 vs 1851.6), the reduced number of parameters results in a substantially lower AIC (AIC = 9.1).
In Fig. H.3 we illustrate the results by overplotting the fitted curve for on a scatter plot of the separate annual estimates from the full model. A longer run of years was analysed by Efford et al. (2016).
H.4 Limitations
Using as a surrogate for is unreliable if the distribution or intensity of sampling varies. This is because depends only on the parameter values, whereas depends also on the detector layout and duration of sampling. For example, if a different size of trapping grid is used in each session, will vary even if the detection parameters, and hence , stay the same. This is also true ( varies, constant) if the same trapping grid is operated for differing number of occasions in each session. It is that really matters, and constant is not a sensible null model in these scenarios.
parameterizations (4) and (5) make sense only if density D is in the model; an attempt to use these when maximizing only the conditional likelihood (CL = TRUE
) will cause an error.
H.5 Other notes
Detection functions 0–3 and 5–8 (‘HN’,‘HR’,‘EX’, ‘CHN’, ‘WEX’, ‘ANN’, ‘CLN’, ‘CG’) describe the probability of detection and use as the intercept instead of . Can parameterizations (3) and (5) also be used with these detection functions? Yes, but the user must take responsibility for the interpretation, which is less clear than for detection functions based on the cumulative hazard (14–19, or ‘HHN’, ‘HHR’, ‘HEX’, ‘HAN’, ‘HCG’, ‘HVP’). The primary parameter is computed as .
In a sense, the choice between detection functions ‘HN’ and ‘HHN’, ‘EX’ and ‘HEX’ etc. is between two parameterizations, one with half-normal hazard and one with half-normal probability , always with the relationship (using for the distance between home-range centre and detector). It may have been clearer if this had been programmed originally as a switch between ‘hazard’ and ‘probability’ parameterizations, but this would now require significant changes to the code and is not a priority.
If a detection function is specified that requires a third parameter (e.g., z in the case of the hazard-rate function ‘HR’) then this is carried along untouched.
It is possible that home range size, and hence , varies in a spatially continuous way with density. The sigmak parameterization does not work when density varies spatially within one population because of the way models of state variables () and detection variables (, , ) are separated within secr. Non-Euclidean distance methods allow a workaround as described in Appendix F and Efford et al. (2016).
Some parameterization options (Table H.2) were not included in Table H.1 because they are not intended for general use and their implementation may be incomplete (e.g., not allowing covariates). Although parameterizations (2) and (6) promise a ‘pure’ implementation in terms of the effective sampling area rather than the surrogate , this option has not been implemented and tested as extensively as that for (parameterization 3). The transformation to determine or requires numerical root finding, which is slow. Also, assuming constant does not make sense when either the detector array or the number of sampling occasions varies, as both of these must affect . Use at your own risk!
H.6 Abundance
We use density as the primary parameter for abundance; the number of activity centres is secondary as it is contingent on delineation of an area .
Appendix J considers an alternative parameterization of multi-session density in terms of the initial density and session-to-session trend .