--
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-sampling+unsubscribe@googlegroups.com.
To post to this group, send email to distance-sampling@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/47fe3151-ceca-4b72-9885-cbb38f1b43e2%40googlegroups.com.
Olivier
Sorry for the slow response, I was travelling last week. I performed an experiment using the "minke" dataset that is included in the Distance package. That dataset contains several transects with no sightings (distances recorded as NA), but no covariates. Consequently, I manufactured a covariate to see if I could get `ds()` to use that covariate in the detection function when there were transects without sightings.
Here is my reproducible code:
library(Distance)
data(minke)
eric <- minke # my toy copy
eric$cov <- runif(min = 0.01, max = 1, n=99)
trouble <- ds(data=eric, key="hn", formula=~cov)
real <- ds(data=eric, key="hn")
summary(trouble)
plot(trouble)
summarize_ds_models(real, trouble, output="plain")
eric.covNA <- eric # another copy
eric.covNA$cov <- ifelse(is.na(eric.covNA$distance),
NA, eric.covNA$cov)
real.trouble <- ds(data=eric.covNA, key="hn",
formula=~cov)
summarize_ds_models(real, trouble, real.trouble,
output="plain")
I produce identical results (see summarize_ds_models() results)
whether I set the covariate on empty transects to NA or to random
values; the covariate value is ignored when distance=NA (i.e.
empty transects). Note in this toy example, the covariate is
continuous rather than discrete as in your case.
I am using these versions of the relevant packages:
other attached packages: [1] Distance_0.9.7 mrds_2.1.18
--
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 post to this group, send email to distance...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/4f8e50fb-976b-436f-8a00-da787250eea9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
-- Eric Rexstad Research Unit for Wildlife Population Assessment Centre for Research into Ecological and Environmental Modelling University of St. Andrews St. Andrews Scotland KY16 9LZ +44 (0)1334 461833 The University of St Andrews is a charity registered in Scotland : No SC013532
Glad you got it sorted Olivier. Multiple factor covariate models
often lead to data gaps that cause problems with optimisation.
--
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 post to this group, send email to distance...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/distance-sampling/d54e9388-8886-481a-acf1-2d4608b0ebf7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.