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
Finally tried to test this with Savannah sparrow data sets. Results of dht2 doesn't seem to work as expected; warnings are issues plus density estimates aren't comparable to estimates produced with multiple, single-level stratification
library(Distance)
data("Savannah_sparrow_1980")
data("Savannah_sparrow_1981")
tom <- rbind(Savannah_sparrow_1980, Savannah_sparrow_1981)
tom$object <- NULL
convert <- convert_units("meter", NULL, "Hectare")
fred <-ds(data=tom, key="hn", adj="cos", transect="point",
formula=~Study.Area+Region.Label, convert.units = convert) # year&pasture as detfn covariates
summary(fred)
plot(fred, pdf=TRUE)
tst <- dht2(fred, flatfile=tom, strat_formula = ~Region.Label+Study.Area,
stratification="geographical", convert_units = convert)
bob <- attr(tst, "density")
knitr::kable(bob[,c(2,1,8,10,12,11)],
caption="Density estimates using two-level stratification.", digits=3)
only80 <- ds(data=Savannah_sparrow_1980, key="hn", transect="point", convert.units = convert)
only81 <- ds(data=Savannah_sparrow_1981, key="hn", transect="point", convert.units = convert)
knitr::kable(only80$dht$individuals$D, caption="Density estimates 1980, separately estimated.",
digits=3)
knitr::kable(only81$dht$individuals$D, caption="Density estimates 1981, separately estimated.",
digits=3)
## Result: good agreement in density estimates for 1980, but 1981 strat estimates are 50% too large
The text was updated successfully, but these errors were encountered:
Is it possible to stratify by two levels – one level being geographic strata within a given year, and then again separating the different years? Would it be a case of having an extra column in “observations”, “transects” and “geo_strat” which had the extra stratification layer, and then having “formula = ~Region.Label + strata” in the dht2 call?
Finally tried to test this with Savannah sparrow data sets. Results of
dht2
doesn't seem to work as expected; warnings are issues plus density estimates aren't comparable to estimates produced with multiple, single-level stratificationThe text was updated successfully, but these errors were encountered: