Skip to content
David Lawrence Miller edited this page Jan 19, 2016 · 2 revisions

Justification

It might be the case that you have a list of detection probabilities for your observations (say from some detection function fitting process other than Distance or mrds). In that case it would be nice to use them with dsm.

These instructions detail how one can use these detection probabilities (and some other information) to build a "dummy" object to give to dsm.

What you need

You'll need to have the following data loaded into R to build the dummy object:

  • truncation distance
  • left truncation (if you're using one)
  • vector of average probabilities of detection (if you have a CDS analysis, then this is just one number)
  • unique object identifier for each probabilities (these need to match what you have in your observation data.frame)

How to do it

dsm expects a ddf object, which is a list with a bunch of elements in it. We only need re-create the elements of the list that dsm cares about.

Let's call our dummy object ddf.dummy and initialize it as a list:

ddf.dummy <- list()
ddf.dummy$meta.data <- list()
ddf.dummy$meta.data$width <- 350
ddf.dummy$meta.data$left <- 22
ddf.dummy$fitted <- bl.prob$pdot.mew
names(ddf.dummy$fitted) <- bl.prob$object

Uncertainty

Calculating uncertainty when your model object is setup like this is hard. The dsm.var.* routines require that you can use the summary method on the detection function model object. This makes things tricky.

Probably the easiest thing to do would be to re-write dsm.var.gam for your particular situation, rather than creating a very complex dummy object.

Clone this wiki locally