Activity estimates

91 views
Skip to first unread message

Maik Henrich

unread,
Feb 10, 2021, 5:00:12 AM2/10/21
to distance-sampling

Dear everyone,

I am using the R package activity to
estimate the proportion of time spent active from the camera trap data  for the correction of the distance sampling results.
Yesterday I noticed that throughout the year, some of the monthly activity estimates are smaller than the lower  boundary of the 95% confidence interval. Did anyone experience something similar and could offer an explanation?
The second point is that I would like to include the variance in the uncertainty of the distance sampling estimate by  resampling activity values  from the confidence interval. I used to do that by using rnorm(1, act 1.96 * se). However the confidence intervals are obviously not normally distributed around the estimate, so I am pretty sure that I cannot do it like this. What would you suggest?

Thanks a lot and best,
Maik

Eric Rexstad

unread,
Feb 15, 2021, 8:46:27 AM2/15/21
to Maik Henrich, distance-sampling

Maik

I've not used the `activity` package, nor am I a behaviourist.  You report that some monthly estimates are smaller than a lower confidence bound of what?

To perform a parametric bootstrap of the estimated activity, I don't think you would use the confidence interval from which to resample.  Instead you assume some distribution for the activity value and resample from that distribution.  If the underlying distribution is the von Mises (I'm not sure this is true), there are a couple of R packages that generate random variates from a von Mises distribution given a direction and concentration parameter:

http://finzi.psych.upenn.edu/library/circular/html/vonmises.html

--
You received this message because you are subscribed to the Google Groups "distance-sampling" group.
To unsubscribe from this group and stop receiving emails from it, send an email to distance-sampl...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/1ea9fc55-a8aa-406f-88b2-3e3601dc0f87n%40googlegroups.com.
-- 
Eric Rexstad
Centre for Ecological and Environmental Modelling
University of St Andrews
St Andrews is a charity registered in Scotland SC013532

Maik Henrich

unread,
Feb 15, 2021, 11:43:11 AM2/15/21
to distance-sampling
Dear Eric Rexstad, dear Stephen Buckland,

Thank you both for your responses!
Some monthly estimates are smaller than their respective confidence intervals, that is what I wanted to say. The actmod-object that is generated by the activity package contains an estimate, its standard error and the lower and upper bounds of the associated confidence interval. For this reason, the estimate as well as the confidence interval should refer to the mean activity. For the confidence intervals, you can choose between non-parametric and parametric bootstrapping (sampling from the fitted probability density distribution)  and the latter is recommended for a sample size of 100 or more.
When I compute the activity estimates for each month in this way for male red deer, I get this:

Red deer males annual activity.jpeg
What I meant with " confidence intervals are obviously not normally distributed around the estimate", was indeed that the CIs are not symmetrically distributed about the point estimate.
I am wondering if it would be possible to extract the raw bootstrapping results from the actmod-package instead of the confidence intervals. That should be the easiest and at the same time most proven method of incorporating the variance into Distance Sampling with camera traps.


All the best,

Maik

Stephen Buckland

unread,
Feb 15, 2021, 12:03:30 PM2/15/21
to Maik Henrich, distance-sampling, Marcus Rowcliffe

Thanks Maik.  Yes, I agree that those results don’t make sense.  You could get results like that if the number of bootstrap resamples was very small, but I assume that is not the case here.  I’m copying this to Marcus Rowcliffe who may be able to help.

 

Steve Buckland

Maik Henrich

unread,
Feb 15, 2021, 12:14:50 PM2/15/21
to distance-sampling
Dear Steve Buckland,

Thanks a lot! I did use 10 000 bootstrap iterations, so too few bootstrap resamples should indeed not be the problem here.

Your support is greatly appreciated!

All the best,
Maik

palencia...@gmail.com

unread,
Feb 15, 2021, 12:26:49 PM2/15/21
to Maik Henrich, distance-sampling

Dear Maik,

 

Probably you checked that, but when using “fitact” function, you have to define the sampling method for bootstrapping in the argument “sample” of the function.

 

“model” is recommended for large sample size (> 100-200), and “data” for sample size < 100.

 

Hope it helps

Pablo

 

De: distance...@googlegroups.com <distance...@googlegroups.com> En nombre de Maik Henrich
Enviado el: lunes, 15 de febrero de 2021 18:15
Para: distance-sampling <distance...@googlegroups.com>
Asunto: Re: [distance-sampling] Activity estimates

 

Dear Steve Buckland,

 

Thanks a lot! I did use 10 000 bootstrap iterations, so too few bootstrap resamples should indeed not be the problem here.

 

Your support is greatly appreciated!

 

All the best,

Maik

 

Stephen Buckland schrieb am Montag, 15. Februar 2021 um 18:03:30 UTC+1:

Thanks Maik.  Yes, I agree that those results don’t make sense.  You could get results like that if the number of bootstrap resamples was very small, but I assume that is not the case here.  I’m copying this to Marcus Rowcliffe who may be able to help.

 

Steve Buckland

 

From: distance...@googlegroups.com [mailto:distance...@googlegroups.com] On Behalf Of Maik Henrich
Sent: 15 February 2021 16:43
To: distance-sampling <distance...@googlegroups.com>
Subject: {Suspected Spam} Re: {Suspected Spam} [distance-sampling] Activity estimates

 

Dear Eric Rexstad, dear Stephen Buckland,

 

Thank you both for your responses!

Some monthly estimates are smaller than their respective confidence intervals, that is what I wanted to say. The actmod-object that is generated by the activity package contains an estimate, its standard error and the lower and upper bounds of the associated confidence interval. For this reason, the estimate as well as the confidence interval should refer to the mean activity. For the confidence intervals, you can choose between non-parametric and parametric bootstrapping (sampling from the fitted probability density distribution)  and the latter is recommended for a sample size of 100 or more.

When I compute the activity estimates for each month in this way for male red deer, I get this:

 

Maik Henrich

unread,
Feb 15, 2021, 12:39:56 PM2/15/21
to distance-sampling
Dear Pablo,

Thanks! Yes, I checked the number of photos for each month and if there were more than 100 I used  sample="model".

All the best,
Maik

Maik Henrich

unread,
Feb 17, 2021, 2:56:58 AM2/17/21
to Marcus.R...@ioz.ac.uk, st...@st-andrews.ac.uk, distance...@googlegroups.com

Dear Marcus,

Thanks a lot for your quick reply!
I noticed that the problem was most pronounced in summer. During this time, there were more than 100 observations per month (e.g.1029 observations in July) and I therefore used sample="model".
Using July as an example, I tested the use of sample="data" instead. As a result, the confidence  intervals look much nicer and also fit a normal distribution with SE * 1.96 very well.

sample="model"

Activity
        sample="model"

sample="data"

Activity
        sample="data"

For now, I  would just use sample="data" regardless of the sample size and everything should be fine. Of course it is still interesting why this happens and how to prevent it.

Thanks again for the support and of course also for developping this very useful R package!

All the best,

Maik



Am 16.02.2021 um 17:56 schrieb Marcus Rowcliffe:

Dear Maik

 

There seems to be a peculiarity in the way circular kernel functions work with bootstrapping which can occasionally lead to parts of fitted trend lines falling outside bootstrapped confidence intervals, depending on the way you resample. It’s something I’ve noticed but not had time to get to the bottom of (hence only very cursory mention of issues with coverage referred to in the fitact function documentation). That said, I’ve never seen the issue arise at the peak of the activity curve, and since the activity level estimate is derived from the height of this peak, I’m surprised to see that the estimate can fall outside its supposed CI – clearly that shouldn’t happen (assuming adequate replication). The fact that it’s happening fairly consistently across your monthly estimates seems extremely odd to me. I’m intrigued!

 

Unfortunately actmod objects do not store the raw bootstrapping results. Perhaps this is something to add to the package, although in the meantime I think it shouldn’t be too hard to hack the available functions to create your own distributions. In my experience, bootstrapped activity levels usually look tolerably normally distributed around the estimate, so I’ve generally used a normal approximation based on the SE.

 

Best regards

Marcus



The Zoological Society of London is incorporated by Royal Charter - Registered Charity in England and Wales no. 208728.
Principal Office England - Company Number RC000749 - Registered address Regent's Park, London, England NW1 4RY

This e-mail has been sent in confidence to the named addressee(s). If you are not the intended recipient, you must not disclose or distribute it in any form, and you are asked to contact the sender immediately.
Views or opinions expressed in this communication may not be those of The Zoological Society of London and, therefore, The Zoological Society of London does not accept legal responsibility for the contents of this message.
The recipient(s) must be aware that e-mail is not a secure communication medium and that the contents of this mail may have been altered by a third party in transit.

If you have any issues regarding this mail please visit:
https://www.zsl.org/about-us/contact-us

Maik Henrich

unread,
Mar 24, 2021, 1:39:08 PM3/24/21
to distance-sampling
Dear Marcus, dear everyone,

today I made another puzzling discovery regarding the activity estimates and I would be very grateful for an explanation of what is happening here and an idea how to proceed.

I am trying to answer two questions:
1) Is the activity level of red deer different from that of roe deer? Here, I used all the data from a camera trapping study with 108 and cameras deployed over more than one year. Activity levels of red deer (0.59, 95 % CI: 0.54-0.65) were slightly lower than for roe deer (0.66, 95% CI:0.57-0.77 )
2) How large is the correlation between activity, movement speed and trapping rates? Here, I divided the dataset by species, sex and month. Because the number of events was very low for some of these subgroups, i decided to include only those with at least ten observations as a minumum sample size. When l average the activity values per species, I get an estimate of 0.48 for red deer and 0.45 for roe deer. There is positive correlation with the trapping rates as expected.

On a seasonal basis, whithout differentation of the sexes roe deer activity estimates are consistently higher than those for red deer, in line with 1). Since roe deer trapping rates are considerably lower (1.31 events per 100 days) than red deer trapping rates (6.24 events per 100 days) and the same is true for the movement speed estimates, this is a bit unexpected.

What would you suggest to answer both of these questions in a correct way?

Thanks a lot!

All the best,
Maik
Reply all
Reply to author
Forward
0 new messages