The likelihood function for the open-population N-mixtures model from Dail and Madsen (2011) is given in Eq. (5). In this model there are four parameters: probability of detection p, initial site abundance , mean population growth rate , and survival probability . There are also two study specific constants: the number of sampling sites R, and the number of sampling occasions T. The total population at site i and time t are given by the latent variables , and the observed population counts are denoted .
The function shown in Eq. (6) calculates the transition probability for moving from a population of size a to a population of size b. To calculate the likelihood equation requires calculating at most times (when each ), where K is the upper bound on the summations and thus also the upper bound on the population size. The complexity of computing is thus the main bottleneck for computing the likelihood function. is a convolution of two discrete distributions and can thus be calculated efficiently using the FFT convolution.
Here and denote the binomial and Poisson distribution functions, respectively. We define the transition probability matrix to be the matrix of values, where a and b vary from 0 to K.
Equation (7) illustrates the relationships between , , convolution, and FFT; let so that (right padded with zeroes until has elements), and let so that , then , and .
Computation of is a large portion of the computational cost of calculating the likelihood function in open-population N-mixture models. In Fig. 1 we show a plot of the median computation times for calculating for increasing values of K using both the manual convolution and the FFT convolution techniques. The values plotted are the median computing times over 100 runs for each value of K. Each run involved generating a random value for drawn from a Beta (, ) distribution and a random value for drawn from a distribution. was then calculated using the same and for both the manual convolution method and the FFT convolution method, and computation times were calculated using the R package microbenchmark (Mersmann 2021). The error bars shown in Fig. 1 indicate minimum and maximum observed computing times. We also note that for both methods, the upper and lower quantiles are indistinguishable from the median computing times on the log plot.
Plot of log median value of computation time measured in milliseconds (out of 100 runs with randomised and ) versus K for computation of the transition probability matrix using manual (grey) and the fast Fourier transform (black) convolution methods. Error bars indicate minimum and maximum computing time over the 100 runs per K. We considered 1, 10, 50, 100, 250, 500, and 1000
Often, time-varying covariates for the population dynamics parameters and are incorporated into N-mixture models. When this is done, the matrix is calculated once for each time point . Thus the computing time savings when using FFT are increased by a factor of up to when time covariates are considered.
In Sect. 3.1 we use a simulation study to illustrate the improved computational efficiency of using the FFT method for calculating when fitting N-mixture models. In Sect. 4.1 we apply the FFT method to improve computing efficiency for an Ancient Murrelet chick counts application.
Do you have any questions about this protocol?
Post your question to gather feedback from the community. We will also invite the authors of this article to respond.
Tips for asking effective questions
+ Description
Write a detailed description. Include all information that will help others answer your question including experimental processes, conditions, and relevant images.