DSM prediction results not read back into Distance

Skip to first unread message


Aug 19, 2021, 7:46:22 PM8/19/21
to distance-sampling
Dear Distance users and developers,

I have encountered erroneous behaviour of the Distance program. When using a DSM model for prediction, the analysis seems to run ok: it sends a job to R, and after completion reads the results back, and population estimate (N) appears in the project browser's Analyses tab. However, in the grid data layer, the prediction column does not contain any valid data. The software has added a column for the prediction results, but all values in this column are -1.
I checked that the commands have run correctly in R and the R workspace contains correct prediction outputs, but for some reason, they are not read back into Distance.
Has someone experienced this before? What can possibly cause this?

best wishes
Ainars Aunins 

Len Thomas

Aug 19, 2021, 9:31:59 PM8/19/21
to distance...@googlegroups.com
Hi Ainars,

The R-to-Distance for windows interface is a piece of code I wrote, so
I'll be happy to have a look and see what might be going wrong. Perhaps
you could email me a copy of your project off the list (please use File
| Export to turn into a zip file and send that, or use a file transfer
site if the zip is too big to email); once we get a resolution then
either you or I could post back to the list.

Best wishes, Len Thomas
> --
> 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/b3f89ab8-678c-4f2d-b04d-c2b09a94b563n%40googlegroups.com
> <https://groups.google.com/d/msgid/distance-sampling/b3f89ab8-678c-4f2d-b04d-c2b09a94b563n%40googlegroups.com?utm_medium=email&utm_source=footer>.

Len Thomas len.t...@st-andrews.ac.uk lenthomas.org @len_thom
Centre for Research into Ecological and Environmental Modelling
and School of Mathematics and Statistics
The Observatory, University of St Andrews, Scotland KY16 9LZ
Office: UK+1334-461801 Admin: UK+1334-461842

While I may be sending this email outside of my normal office hours,
I have no expectation to receive a reply outside of yours.

The University of St Andrews is a charity
registered in Scotland, No SC013532.

Len Thomas

Aug 24, 2021, 5:46:33 PM8/24/21
to distance...@googlegroups.com
Just to close the loop on this topic, for now:

It turns out that what Ainars described is a problem we've encountered
before in this context, and is caused by a bug when passing prediction
results back from R (which runs DSM models) back to Distance for
Windows. The bug manifests itself only in Windows systems where the
regional settings are set such that a decimal place is represented by a
comma. A workaround is to set the regional setting in Windows to
English (UK) or similar while running predictions.

The bug is described in more detail here

It has been scheduled to be fixed in the next release of Distance for
Windows (which is currently scheduled for the end of this year).

With best wishes, Len Thomas


Sep 1, 2021, 8:04:47 AM9/1/21
to distance-sampling
An update on this issue.

We have now implemented the fix and have a dll which can be distributed to fix this issue in the short term before the next release of Distance.
The fix involves replacing the dll with the bug with our newly compiled one.

If you are struggling with this issue and would like a copy of the new dll and instructions for installing it, please get in touch with us at:
Screenshot 2021-09-01 at 13.01.57.png

Best wishes,
Laura Marshall
Reply all
Reply to author
0 new messages