MRDS where some transects only have a single observer

109 views
Skip to first unread message

Michael Scroggie

unread,
Oct 1, 2020, 2:12:59 AM10/1/20
to distance-sampling
I'm currently doing an analysis of some mark-recapture distance sampling data for an arboreal mammal. The majority of transects were surveyed by two observers working independently. For these transects it has been straightforward to fit a MRDS model ( point independence variant) using the mrds package in R, with code like this:

ddf.hr<-ddf(method="io", 
            dsmodel=~cds(key="hr", adj.series=NULL, adj.order=NULL, formula=~1), 
            mrmodel=~glm(link="logit", formula=~distance),
            data=detections, 
            meta.data=meta)

Where  detections is a dataframe containing the distance data (2 entries for each animal recording detection or not by observer 1 and 2), and meta is the list of metadata settings for the model fitting process (not shown here). So far, so good. The model works well, and presented no particular difficulties. 

My question is, whether there is a way to incorporate data from some additional transects that were surveyed using the same methods, but only by a single observer. My thinking here is that if the detection process on these transects is equivalent to that for the first observer on a double-observer transect, then such a model should be estimable. However adding single-observer entries to the detections data.frame for animals observed on the single-observer transects (which usually contains two rows for each individual animal recording detection or not by each observer) results in an error message:

Error in process.data(data, meta.data) : 
  number of records for primary observer not equal to number for secondary observer

Is there perhaps a way to trick mrds into estimating the model I have in mind? Or is this either a very bad idea, or something that is not possible for mrds to do?

Regards,

Michael Scroggie

Eric Rexstad

unread,
Oct 1, 2020, 11:35:45 AM10/1/20
to Michael Scroggie, distance-sampling

Michael

Thanks for laying out your question clearly.  Unfortunately, I don't know of a way to fool the software into doing what you desire.  There are error traps (as you discovered) to prevent mismatches of unpaired records (records for each observer) from being processed.  I don't think there's a way to circumvent the situation.

--
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/b2d7bd88-6690-4ad9-90aa-ec9451aea983n%40googlegroups.com.
-- 
Eric Rexstad
Centre for Ecological and Environmental Modelling
University of St Andrews
St Andrews is a charity registered in Scotland SC013532

Mark Wilson

unread,
Oct 2, 2020, 4:25:38 AM10/2/20
to Eric Rexstad, Michael Scroggie, distance-sampling
Apologies if I am over-simplifying, but would there be any disadvantage to treating all observer input as independent transects? Granted, the areas being sampled by each of the paired observers overlaps, but this shouldn't matter either for estimating the detection function (the more data the merrier!) or, provided effort is specified correctly, estimating density. And there should be no problem in adding in data from single observer transects. The only reason I can think of for not doing this is if detection efficiency of an observer in a paired transect is materially affected by the presence of their partner observer (e.g. if there is communication between them to during the transect that leads to more animals being detected than would otherwise be the case; or if animals flushed from one transect are sometimes picked up by the observer on the other transect). If there are differences in efficiency between individual observers, I'd have thought this could be accounted for by including observer ID in the model.

Cheers,

Mark




--
Dr Mark Wilson
Senior Research Ecologist
BTO Scotland

Unit 15
Beta Centre
Innovation Park
University of Stirling
FK9 4NF

Tel: 01786 458024

Registered Charity No SC039193 (Scotland) and No 216652 (England & Wales)
Company Limited by Guarantee No 357284 (England & Wales)

Michael Scroggie

unread,
Oct 2, 2020, 5:27:40 AM10/2/20
to Mark Wilson, Eric Rexstad, distance-sampling
Hi Mark, 

Thanks for your suggestion, but I don't think that would work in our case, because g(0) is substantially less than one. The purpose for using the two observers in our surveys is to gather independent detection data for animals along the transect from two observers, and use a mark-recapture component of the model to infer g(0), thereby correcting for non-detection of animals on the line. Of course, if g(0)=1, then you can just treat the two observers as extra effort as you suggested.

Regards,

Michael Scroggie

David Lawrence Miller

unread,
Oct 2, 2020, 7:35:36 AM10/2/20
to Michael Scroggie, distance-sampling
Hi Michael, hi listfolks,

Interesting question, which I think distills down to: "can I use
multiple detection functions of different types to obtain one abundance
estimate?"

Eric is correct that there's currently no way in mrds/Distance to do
this unfortunately. I'd like to eventually add to mrds/Distance the
ability to build this kind of joint model.

In the meantime I wonder if a simplistic "manual" version of the
functionality I was thinking about would work. At the moment you have an
estimate of abundance from your MRDS study. You could fit a separate
detection function to the single observer observations and then post-hoc
correct them for g(0), assuming the same value that you got in your MRDS
analysis, then average the densities over the two separate analyses
(you'd assume independence and the CV^2 would add). This would make
sense if there were plenty of single observer observations, but if you
don't have many then the detection function and encounter rate
uncertainties for the single observer bit would end up being rather large.

I can think of more advanced versions of the above but they are rather
more involved and might not be worth it if you don't have that many more
observations or are uncomfortable applying the g(0) estimate to these
other observations.

cheers,
--dave
> <mailto:distance...@googlegroups.com>> wrote:
>
> Michael
>
> Thanks for laying out your question clearly.  Unfortunately, I
> don't know of a way to fool the software into doing what you
> desire.  There are error traps (as you discovered) to prevent
> mismatches of unpaired records (records for each observer) from
> being processed.  I don't think there's a way to circumvent the
> situation.
>
> On 01/10/2020 07:12, Michael Scroggie wrote:
>> I'm currently doing an analysis of some mark-recapture
>> distance sampling data for an arboreal mammal. The majority of
>> transects were surveyed by two observers working
>> independently. For these transects it has been straightforward
>> to fit a MRDS model ( point independence variant) using the
>> /mrds/ package in R, with code like this:
>>
>> ddf.hr <http://ddf.hr><-ddf(method="io",
>> <mailto:distance-sampl...@googlegroups.com>.
>> <https://groups.google.com/d/msgid/distance-sampling/b2d7bd88-6690-4ad9-90aa-ec9451aea983n%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> Eric Rexstad
> Centre for Ecological and Environmental Modelling
> University of St Andrews
> St Andrews is a charity registered in Scotland SC013532
>
> --
> 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
> <mailto:distance-sampl...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/distance-sampling/90b9f92c-9c9b-3d26-88be-993b71377489%40st-andrews.ac.uk
> <https://groups.google.com/d/msgid/distance-sampling/90b9f92c-9c9b-3d26-88be-993b71377489%40st-andrews.ac.uk?utm_medium=email&utm_source=footer>.
>
>
>
> --
> Dr Mark Wilson
> Senior Research Ecologist
> BTO Scotland
>
> Unit 15
> Beta Centre
> Innovation Park
> University of Stirling
> FK9 4NF
>
> Tel: 01786 458024
>
> Registered Charity No SC039193 (Scotland) and No 216652 (England &
> Wales)
> Company Limited by Guarantee No 357284 (England & Wales)
>
> --
> 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
> <mailto:distance-sampl...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/distance-sampling/CAE9drd-4013Eomu_4hUKXoNmSePoiOGjVYRwxby_w%2BEe4Mn4FQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/distance-sampling/CAE9drd-4013Eomu_4hUKXoNmSePoiOGjVYRwxby_w%2BEe4Mn4FQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.

Michael Scroggie

unread,
Oct 2, 2020, 8:02:34 AM10/2/20
to David Lawrence Miller, distance-sampling
Thanks very much for your suggestions David,

I think the ad hoc approach you mention would work fairly well, especially if there were plenty of both double and single observer transects in the dataset, meaning that distance functions could confidently be fitted to the two data types. It might be less suited to situations where a small minority of the available data are single-observer. I'm yet to decide whether this approach will be suitable for my current problem, but it will probably be worth giving it a try. 

Ultimately, I think I might need to come up with a bespoke means of dealing with both these data-types in an integrated manner. I'm currently working on trying to get point-independence MRDS working in JAGs, which I think could then provide a means of  incorporating the single observer transects into the model by virtue of (assumed) shared parameters. This might actually suit the application we are working on quite well, as we also have in mind to include some other data types as well (transect counts without distances). If we can assume some level of commonality in the detection process for observers undertaking all three survey types, I think we might be able to cautiously stitch the likelihoods for everything together.  

I'm very grateful for your suggestions and your work on the mrds package.

Cheers,

Michael. 

 

David Lawrence Miller

unread,
Oct 5, 2020, 6:05:34 AM10/5/20
to Michael Scroggie, distance-sampling
Hi Michael, hi listfolk,

Just a quick note in case it's useful. I've been experimenting with more
complex likelihoods using Nimble, rather than JAGS. The language is
almost identical but writing custom likelihoods (as we need for MCDS/CDS
models) is much easier than in JAGS (no zeros/ones trick) and much faster.

I've put some example code here:
https://gist.github.com/dill/db6d049a504f52f4b414d7769beffbff in case
it's useful. It's for the point transect case with 2 covariates but I
think it gives the general idea of what you can do in these cases that
are not currently covered by the Distance/mrds packages. To be clear
though, we do hope to include these kinds of analyses in the future!

cheers,
--dave



On 02/10/2020 13:02, Michael Scroggie wrote:
> Thanks very much for your suggestions David,
>
> I think the /ad hoc /approach you mention would work fairly well,
> >     <mailto:distance...@googlegroups.com
> <mailto:distance...@googlegroups.com>>> wrote:
> >
> >         Michael
> >
> >         Thanks for laying out your question clearly.
> Unfortunately, I
> >         don't know of a way to fool the software into doing what you
> >         desire.  There are error traps (as you discovered) to prevent
> >         mismatches of unpaired records (records for each
> observer) from
> >         being processed.  I don't think there's a way to
> circumvent the
> >         situation.
> >
> >         On 01/10/2020 07:12, Michael Scroggie wrote:
> >>         I'm currently doing an analysis of some mark-recapture
> >>         distance sampling data for an arboreal mammal. The
> majority of
> >>         transects were surveyed by two observers working
> >>         independently. For these transects it has been
> straightforward
> >>         to fit a MRDS model ( point independence variant) using the
> >>         /mrds/ package in R, with code like this:
> >>
> >> ddf.hr <http://ddf.hr> <http://ddf.hr
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>
> >>         <mailto:distance-sampl...@googlegroups.com
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>>.
>  <https://groups.google.com/d/msgid/distance-sampling/b2d7bd88-6690-4ad9-90aa-ec9451aea983n%40googlegroups.com?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/distance-sampling/b2d7bd88-6690-4ad9-90aa-ec9451aea983n%40googlegroups.com?utm_medium=email&utm_source=footer>>.
> >
> >         --
> >         Eric Rexstad
> >         Centre for Ecological and Environmental Modelling
> >         University of St Andrews
> >         St Andrews is a charity registered in Scotland SC013532
> >
> >         --
> >         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
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>
> >         <mailto:distance-sampl...@googlegroups.com
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>>.
>  <https://groups.google.com/d/msgid/distance-sampling/90b9f92c-9c9b-3d26-88be-993b71377489%40st-andrews.ac.uk?utm_medium=email&utm_source=footer <https://groups.google.com/d/msgid/distance-sampling/90b9f92c-9c9b-3d26-88be-993b71377489%40st-andrews.ac.uk?utm_medium=email&utm_source=footer>>.
> >
> >
> >
> >     --
> >     Dr Mark Wilson
> >     Senior Research Ecologist
> >     BTO Scotland
> >
> >     Unit 15
> >     Beta Centre
> >     Innovation Park
> >     University of Stirling
> >     FK9 4NF
> >
> >     Tel: 01786 458024
> >
> >     Registered Charity No SC039193 (Scotland) and No 216652
> (England &
> >     Wales)
> >     Company Limited by Guarantee No 357284 (England & Wales)
> >
> > --
> > 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
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>
> > <mailto:distance-sampl...@googlegroups.com
> <mailto:distance-sampling%2Bunsu...@googlegroups.com>>.
> <https://groups.google.com/d/msgid/distance-sampling/CAE9drd-4013Eomu_4hUKXoNmSePoiOGjVYRwxby_w%2BEe4Mn4FQ%40mail.gmail.com?utm_medium=email&utm_source=footer
> <https://groups.google.com/d/msgid/distance-sampling/CAE9drd-4013Eomu_4hUKXoNmSePoiOGjVYRwxby_w%2BEe4Mn4FQ%40mail.gmail.com?utm_medium=email&utm_source=footer>>.
>
> --
> 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
> <mailto:distance-sampl...@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/distance-sampling/CAE9drd9kay0FMRy9emoFBrmEKzC%2B2sABTr-ENvNK%3DqUGx8uUkw%40mail.gmail.com
> <https://groups.google.com/d/msgid/distance-sampling/CAE9drd9kay0FMRy9emoFBrmEKzC%2B2sABTr-ENvNK%3DqUGx8uUkw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
Reply all
Reply to author
Forward
0 new messages