I have to be somewhat vague regarding data and such for confidentiality purposes (I'm not allowed to share whole data). I have a dataset (X) that represents transects (representing line transects of animals in space).

  Birds        area      len       transect
  1            0.239310  0.478621  1
  2            0.238463  0.476927  1
  1            0.244382  0.488765  2
  4            0.236501  0.473002  2 
  0            0.245832  0.491665  3
  1            0.241026  0.482052  4 

When I calculate the mean density of the birds, e.g.:

meandensity <- sum(X$Birds)/sum(X$area)

in the dataset, I get a mean value of ~3.63.

The problem is I've been given a MATLAB module written by someone else (and I can't read MATLAB code) who claims to be using a block bootstrap method to estimate mean and confidence intervals. When I run that module, the mean density gets estimated at ~4.6.

Now, I spoke to this person and have tried to replicate his bootstrap method and am getting a value of ~3.5.

My questions: Can the bootstrapped estimate of the mean really differ this much from the mean of the whole dataset? My understanding was that the bootstrap estimate shouldn't be super far from the mean, and differences between bootstrap methods would impact the CIs more than the estimated mean.

  • 3
    $\begingroup$ Please include what "block bootstrap" is according to you and in this specific example. $\endgroup$
    – Jim
    Commented May 8, 2018 at 16:33
  • 2
    $\begingroup$ There is a block bootstrap that is used in time series analysis, but what kind of block bootstrap is being used in this situation. How does it differ from the ordinary bootstrap? $\endgroup$ Commented May 8, 2018 at 16:55
  • $\begingroup$ Well, you seem to have spatial dependence in your data and, if the data have been collected over time as well as over space, you'll have temporal dependence. So whatever block bootstrap method you will use will have to reflect the spatial and/or temporal dependence aspects of the data. $\endgroup$ Commented May 8, 2018 at 18:11
  • 1
    $\begingroup$ Thanks for the questions. Block-bootstrapping in this case is spatial. So, the bootstrap unit is Transect ID, instead of each individual data point. $\endgroup$ Commented May 8, 2018 at 21:10
  • 1
    $\begingroup$ @isabellaGhement there is a temporal aspect, but it's very short. These are aerial surveys, and so it's a matter of hours for an entire survey. We treat them here as "snapshots" $\endgroup$ Commented May 8, 2018 at 21:12

1 Answer 1


Can you find a way to assess the amount of spatial dependence in your data? If you find evidence for weak dependence, that should confirm that your understanding is correct. For that assessment, I would imagine you need some lat and long coordinates for the mid-spot of each area or something to that effect. If you don't have access to these coordinates, you would have to blindly apply block bootstrapping, which is not necessarily ideal, as you may end up either under-estimating or over-estimating the block length.

By the way, for your computation of density, shouldn't you divide the sum of the bird counts to the sum of the areas? It seems like your formula is set backwards (unless I am missing something).

I guess another way to estimate the expected density (birds/km^2) is to use a Poisson regression where the bird count in each area is the outcome variable and the area size is treated as an offset. The model would include an intercept as well as a possibly nonlinear function of lat and possibly nonlinear function of lon, with the latter two aiming to capture spatial dependence among bird counts from areas that are close to each other. (See Can I use glm with Poisson family if counts data are treated as density?.)

  • 1
    $\begingroup$ Thanks - there is some level of spatial autocorrelation between points, but not between transects as it turns out. Transects being the unit that I am doing the bootstrap on. Sorry for the mix up with the formula - I made the mistake in this post, not in the code. $\endgroup$ Commented May 10, 2018 at 12:05
  • $\begingroup$ If you have multiple observations from the same transect, I would imagine those are correlated. $\endgroup$ Commented May 10, 2018 at 14:43
  • 1
    $\begingroup$ Aye - they are - within transects - due to bird flocking behaviour. $\endgroup$ Commented May 11, 2018 at 8:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.