DS() messages

40 views
Skip to first unread message

nicoline nørgaard

unread,
Nov 19, 2024, 11:16:57 AM11/19/24
to distance-sampling
Hi there 
I'm doing a DSM, but the first step is to perform a detection function. My data has the columns Effort, Area, size, Region.Label, distance, Transect and ID-number. 
I do not have a Sample.Label, that is in my segdata and obsdata.

I perform my first ds() but I get these messages when I run the code:
> hn <- ds(data = West.dist.24.Area, key = "hn", adjustment = NULL, > hr.max <- ds(West.dist.24.Area, max(West.dist.24.Area$distance), key="hr", adjustment=NULL, convert_units = conversion.factor)
Advarsel: Unknown or uninitialised column: `distbegin`.Fitting hazard-rate key function AIC= 305.383 No survey area information supplied, only estimating detection function.
I have not tried before to get those messages. I hope someone knowns how to deal with this. 

Nicoline

Eric Rexstad

unread,
Nov 19, 2024, 11:44:14 AM11/19/24
to nicoline nørgaard, distance-sampling
Nicoline

Welcome to the list. Can you repeat the code for the detection function models you are fitting; I think the lines have been mangled in your original email. The bit "max(West.dist.24.Area$distance)" does not have an argument label, that I can see; perhaps this has confused "ds()"

From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of nicoline nørgaard <nico.lin...@gmail.com>
Sent: 19 November 2024 13:12
To: distance-sampling <distance...@googlegroups.com>
Subject: [distance-sampling] DS() messages
 
--
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 visit https://groups.google.com/d/msgid/distance-sampling/9a6254ec-abf1-4172-b100-e3d89f267ab4n%40googlegroups.com.

nicoline nørgaard

unread,
Nov 20, 2024, 10:02:39 AM11/20/24
to distance-sampling

Hi Eric 

Thanks for a fast reply !

I have uploaded my code and the error message as a picture this time.  I have also added a screenshot of the first rows of my west.dist.24.Area. Maybe that will help you. 

I hope you can help me why i get these messages, I have not seen those when i was working with ds() before. 

Nicoline :) 
Skærmbillede 2024-11-20 154305.png
Skærmbillede 2024-11-20 154401.png

Eric Rexstad

unread,
Nov 20, 2024, 10:18:37 AM11/20/24
to nicoline nørgaard, distance-sampling
Nicoline

The first few rows of the data frame indicates it is data from a double observer survey, presumably you are trying to estimate g(0) in your analysis. However, you are using the "ds" function, that does not know about double observer protocols. I've not tried to feed double observer data to "ds" to see what happens. Could this be the cause of the issue.

Note, the message you are receiving is a "warning" and not an "error". I see an AIC value is produced, I presume that means your detection function model fitting was successful; have you checked "summary(hr)" to see if everything is happy?

Sent: 20 November 2024 14:47
To: distance-sampling <distance...@googlegroups.com>
Subject: Re: [distance-sampling] DS() messages
 

nicoline nørgaard

unread,
Nov 21, 2024, 2:22:51 AM11/21/24
to distance-sampling
Hi Eric 
It is double observer data that I have, but there is only one row for each sight (the average pod size and distance has been taken). I do get an AIC score and and by summary() I get an estimation of N but I miss the part of summary statistics and density.

But the "guide" I have been looking at, the same link as you send to me, when they use their "distdata" they also get summary() only till N estimation. I think I thought that the warning was an error, but maybe thats a normal warning message then? 


//Nicoline

Eric Rexstad

unread,
Nov 21, 2024, 5:09:18 AM11/21/24
to nicoline nørgaard, distance-sampling
Nicoline

Thanks for the clarification regarding double observer data (with one observer removed).

Seems you have resolved that your model fitting resulted in a warning not an error. Given you are intending to produce model-based (DSM) estimates, then it is not a problem that you are missing density estimates. As you note, you have not provided a Sample.Label in the data you have fed to "ds()" so its job is merely to fit a detection function model; the remainder of your inference will come from "dsm()"


Sent: 21 November 2024 07:22

nicoline nørgaard

unread,
Nov 21, 2024, 5:17:07 AM11/21/24
to distance-sampling
Hi Eric, Thank you very much for clarifying this and thank you for the quick response time.

//Nicoline
Reply all
Reply to author
Forward
0 new messages