# NOT RUN {
# Load the example datasets of sparrow detections and transects from package
data(sparrow.detections)
data(sparrow.transects)
# Automate fitting multiple detection functions
# And estimate abundance (density per ha in this case) given the 'best' detection function
# Note, area=10000 converts to density per hectare (for distances measured in meters)
# Note, a person should do more than R=20 iterations
F.automated.CDA(detection.data=sparrow.detections, transect.data=sparrow.transects,
likelihood=c("halfnorm", "hazrate", "negexp"),
series=c("cosine", "simple"),
expansions=c(0, 1), area=10000, R=20, ci=0.95, by.id=FALSE,
plot.bs=FALSE, w.hi=150, plot=TRUE)
# }
Run the code above in your browser using DataLab