Linking two different cue rates in point distance sampling

6 views
Skip to first unread message

Eric Enrique Flores De Gracia

unread,
Feb 2, 2026, 9:57:41 AM (9 days ago) Feb 2
to distance...@googlegroups.com
Dear all,

I am trying to include two different cue.rates into my point distance analysis but failed to do it right.

After including this script the two cue.rates appeared:

cuerate<-unique(datanew2[ ,c("Cue.rate","Cue.rate.SE")])
names(cuerate)<-c("rate","SE")
(mult<-list(creation=cuerate))

    rate   SE
1   1.39 0.20
427 0.97 0.09

But then when trying to obtain the density estimate the following error comes:

Error in dht2_multipliers(multipliers, bigdat) :
  Multirow multipliers need column to link to the data

My link column is season since the two different cue.rates are produced on different seasons, so how can I link this?

Regards,

--
Eric Flores De G.
Personal website

"There is no form of prose more difficult to understand and more tedious to read than the average scientific paper", Francis Crick
"Cuando lo extraordinario se vuelve común, estamos en Revolución", Che Guevara - América


Eric Rexstad

unread,
Feb 2, 2026, 10:24:00 AM (9 days ago) Feb 2
to Eric Enrique Flores De Gracia, distance...@googlegroups.com
Eric

The data frame you build containing the stratum-specific cue rates and measures of precision need to have an added column containing the name of the stratum to which the stratum-specific cue rate applies.  Here is a toy example using one of the example data sets shipped with the Distance package:

library(Distance)
data(minke)
mult.list <- list(creation=data.frame(Region.Label=c("North", "South"),rate=2, SE=1),
                  decay=data.frame(Region.Label=c("North", "South"), rate=c(0.5, 0.2), SE=c(0.1, 0.05)))
print(mult.list)
fitmod <- ds(minke, key="hr", truncation=1.5)
adjust.mult <- dht2(ddf=fitmod, flatfile = minke, 
                    strat_formula = ~Region.Label, multipliers = mult.list)

Note the "mult.list" object contains two tables, each table with two rows (one for each stratum) as well as three columns: "Region.Label" as well as "rate" and "SE".

All of this said, there is an issue report from May 2025 in our Github repository indicating there is a problem with analyses when there are stratum-specific multipliers.  Have a look at the issue described at this link https://github.com/DistanceDevelopment/Distance/issues/205

Let us know what happens when you add a "Region.Label" to your "cue.rate" data frame. If you encounter an error, I'm afraid you might need to wait for issue #205 to be resolved.


From: distance...@googlegroups.com <distance...@googlegroups.com> on behalf of Eric Enrique Flores De Gracia <sai...@gmail.com>
Sent: 02 February 2026 14:57
To: distance...@googlegroups.com <distance...@googlegroups.com>
Subject: [distance-sampling] Linking two different cue rates in point distance sampling
 
--
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/CABSznePRXKg8YV_vdTcGbLtmJXdTukXpgaDS42uR6Kuqavqcaw%40mail.gmail.com.

Eric Enrique Flores De Gracia

unread,
Feb 2, 2026, 4:40:45 PM (9 days ago) Feb 2
to Eric Rexstad, distance...@googlegroups.com
Dear Eric

Thanks for your prompt reply. In fact I came over with the same error

adjust.mult<-dht2(hr.model6,flatfile=datanew2,strat_formula=~Region.Label,ci_width = 0.95,multiplier=mult.list,convert_units=conversion.factor)
Error in ii == "decay" && multipliers[[ii]]$SE != 0 :
  'length = 2' in coercion to 'logical(1)'

So I will try to use the cue rate for my different seasons and estimate a density for each season separately.

Thanks Eric
Reply all
Reply to author
Forward
0 new messages