tmcd82070 / Rdistance

An R package for simple, regression-like, distance-based analyses
8 stars 3 forks source link

Bootstrapping with covariates throwing warnings #108

Open tmcd82070 opened 1 year ago

tmcd82070 commented 1 year ago

When covariates are present, bootstrapping is throwing warnings that are troubling.

dfuncObs <- dfuncEstim(formula = dist ~ observer + offset(groupsize)
                     , detectionData = sparrowDetectionData
                     , siteData = sparrowSiteData
                     , w.hi = units::as_units(100, "m"))

abundEstim( dfuncObs
                   , detectionData = sparrowDetectionData
                   , siteData = sparrowSiteData
                   , R = 5
                   , ci = 0.95
                  , area = units::set_units(1000, "m^2"))

Produces:

Warning messages:
1: In B$effDistance[i] <- efd :
  number of items to replace is not a multiple of replacement length
2: In B$effDistance[i] <- efd :
  number of items to replace is not a multiple of replacement length
3: In B$effDistance[i] <- efd :
  number of items to replace is not a multiple of replacement length
4: In B$effDistance[i] <- efd :
  number of items to replace is not a multiple of replacement length
5: In B$effDistance[i] <- efd :
  number of items to replace is not a multiple of replacement length
6: In structure(as.numeric(e1), dim = dim(e1)) == structure(as.numeric(e2),  :
  longer object length is not a multiple of shorter object length
7: In `>.default`(x.bs, x) :
  longer object length is not a multiple of shorter object length

Need to chase this down and figure out why efd is not 1X1.