Line Transects - With Covariates

Author

Trent McDonald

Published

April 8, 2025

Modified

April 24, 2025

Abundance via line-transect distance-sampling when detection depends on covariates.

library(Rdistance)
Loading required package: units
udunits database from C:/Users/trent/AppData/Local/R/win-library/4.4/units/share/udunits/udunits2.xml
Rdistance (v4.0.5)
data(sparrowDf)

oneHectare <- units::set_units(1, "ha")
whi <- set_units(200, "m")

dfuncFit <- sparrowDf |>
  dfuncEstim(dist ~ bare + groupsize(groupsize)
             , likelihood = "hazrate"
             , w.hi = whi) |> 
  abundEstim(area = oneHectare
             , ci = NULL)

summary(dfuncFit)
Call: dfuncEstim(data = sparrowDf, dist ~ bare + groupsize(groupsize),
   likelihood = "hazrate", w.hi = whi)
Coefficients:
             Estimate   SE           z          p(>|z|)     
(Intercept)  3.2286705  0.230692317  13.995570  1.658934e-44
bare         0.0121463  0.003512757   3.457768  5.446697e-04
k            3.1555121  0.411057867   7.676564  1.634122e-14

Convergence: Success
Function: HAZRATE  
Strip: 0 [m] to 200 [m] 
Average effective strip width (ESW): 66.26353 [m] (range 48.15397 [m] to 86.61737 [m]) 
Average probability of detection: 0.3313176 (range 0.2407699 to 0.4330868)
Scaling: g(0 [m]) = 1
Log likelihood: -1641.974 
AICc: 3290.016

     Surveyed Units: 36000 [m] 
   Individuals seen: 372 in 354 groups 
 Average group size: 1.050847 
   Group size range: 1 to 3 
Density in sampled area: 8.02391e-05 [1/m^2]
Abundance in 10000 [m^2] study area: 0.802391
plot(dfuncFit
     , newdata = data.frame(bare = c(30, 40, 50))
     , lty = 1
     , nbins = 30
     , border = NA
     , col = "grey75")