You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
David Lawrence Miller edited this page Jan 4, 2014
·
2 revisions
(in)Frequently Asked Questions
Limiting observations from a fitted detection function
Question: "Is it possible in dsm in R to use the global detection function limited to the observations for a specific strata? I found a post/response on the distance list that has a solution in Distance to use the "table for values" option to select the detection function for each sighting. Is it possible to do the same in R?"
So, in general, how does one fit a detection function to all observations but then fit a DSM to a subset (say, in a strata)?
Answer: This is relatively straight-forward. The easiest way of dealing with this is to take the fitted ddf object (using Distance or mrds) and remove the observations that you don't want. dsm only cares about the $fitted element of the detection function so the following code should work
ddf.obj$fitted <- ddf.obj$fitted[index]
where index is a vector of the elements you want to keep.