Hi Eric,
I am doing a multi species analysis using the following formula and I can’t for life of me figure out what might be causing the warning message below?
head(mult.spec_2020)
Region.Label Area date transects Sample.Label repeats Effort species size distance max.temp min.temp month
1 Witchelina 4219 13/07/2020 TS-W-T1-P1 1 1 1 roo 1 129 18.1 2.5 July
2 Witchelina 4219 13/07/2020 TS-W-T1-P1 2 1 1 rabbit 1 54 18.1 2.5 July
3 Witchelina 4219 13/07/2020 TS-W-T1-P3 3 1 1 roo 1 228 18.1 2.5 July
4 Witchelina 4219 13/07/2020 TS-W-T1-P4 4 1 1 roo 1 196 18.1 2.5 July
5 Witchelina 4219 13/07/2020 TS-W-T1-P4 5 1 1 roo 1 203 18.1 2.5 July
6 Witchelina 4219 13/07/2020 TS-W-T1-P5 6 1 1 roo 1 380 18.1 2.5 July
dht.spec.ests_2020 <- dht2(ddf = mult.spec.est_2020,
flatfile = mult.spec_2020,
strat_formula = ~ species,
convert_units = 0.001,
stratification = "object")
Warning messages:
1: In `[<-.data.frame`(`*tmp*`, flatfile$Sample.Label %in% sl_diff, :
provided 14 variables to replace 13 variables
2: In `[<-.data.frame`(`*tmp*`, flatfile$Sample.Label %in% sl_diff, :
provided 14 variables to replace 13 variables
Help greatly appreciated.
Cheers
Alex
Sent from Mail for Windows 10
Alex
Thanks for sending along your code and data. From your survey you are trying to produce annual estimates of kangaroo abundance from surveys stretching over three years.
In this instance, you need not adopt the approach that uses `dht2` as described in the example at https://examples.distancesampling.org, designed for producing species-specific estimates. If you wish to have annual estimates, treat year as strata (Region.Label) and use Region.Label as a covariate. This will provide year-specific detection functions (from the covariate) and will report year-specific estimates, without the need for `dht2`.
Here's a snippet of the code:
#====================
roo_all$Region.Label <- as.factor(roo_all$year)
#====================
mult.spec.est_year <-ds(roo_all,
key = "hn",
adjustment = NULL,
transect = "point",
convert.units = 0.001,
formula = ~Region.Label,
truncation = "5%")
summary(mult.spec.est_year)
plot(mult.spec.est_year, pdf= TRUE)
gof_ds(mult.spec.est_year)
and a snippet of the output from `ds`
Summary
for individuals
Summary statistics:
Region Area CoveredArea Effort n ER se.ER
cv.ER mean.size se.mean
1 2019 4219 44.849710 104 127 1.2211538 0.07094362
0.05809556 1.270000 0.06942040
2 2020 4219 4.743719 11 9 0.8181818 0.12196734
0.14907120 1.000000 0.00000000
3 2021 4219 10.781180 25 48 1.9200000 0.25768197
0.13420936 2.000000 0.25537696
4 Total 12657 60.374609 140 184 1.3142857 0.07455639
0.05672769 1.383459 0.07373279
Abundance:
Label Estimate se cv lcl ucl df
1 2019 53290.37 6791.47 0.1274427 41487.33 68451.34 190.5947
2 2020 44820.02 22380.80 0.4993482 17633.24 113923.14 139.3424
3 2021 32670.74 12502.74 0.3826893 15738.55 67819.31 152.7468
4 Total 130781.13 26519.06 0.2027743 87963.44 194441.06 151.3944
Density:
Label Estimate se cv lcl ucl df
1 2019 12.631043 1.609735 0.1274427 9.833451 16.22454 190.5947
2 2020 10.623375 5.304763 0.4993482 4.179484 27.00240 139.3424
3 2021 7.743717 2.963438 0.3826893 3.730398 16.07474 152.7468
4 Total 10.332712 2.095209 0.2027743 6.949786 15.36233 151.3944
You will note the quite large CVs on the
2020 and 2021 estimates, to be expected from the small number of
detections in those years.
--
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 on the web visit https://groups.google.com/d/msgid/distance-sampling/527B8D0D-CA3B-48FB-AE1A-D9B2F090F9CC%40hxcore.ol.
-- Eric Rexstad Centre for Ecological and Environmental Modelling University of St Andrews St Andrews is a charity registered in Scotland SC013532