0

I'm trying to use R-distance to get abundance estimates of birds from transect data. I'm quite confident I have the code right but I am getting "Inf" for the abundance estimate, which I'm assuming means infinite. Can anyone tell me why? Here's the code for the abundance:

dfunc <- F.dfunc.estim(M.ob, likelihood="halfnorm", w.hi=40)
    plot(dfunc) # construct distance function 
##
abun<- F.abund.estim(dfunc, detection.data=M.ob,
                     transect.data=M.t,
                     area=100, R=100, ci=0.95, plot.bs=TRUE)

Where M.ob are the observations with perp. distance from the transect, and M.t is the details on the transect (length eg.).

Thanks for your help. If I you need more details on my data let me know.

EDIT: These are functions from the package "R-distance".

Here's what my data looks like:

> head(M.ob)
  siteID groupsize dist sample
1     L1         1    5      1
2     L1         1    5      1
3     L1         1    5      1
4     L1         1    5      1
5     L1         1    5      1
6     L1         1    5      1
> str(M.ob)
'data.frame':   85 obs. of  4 variables:
 $ siteID   : Factor w/ 3 levels "L1","L2","L3": 1 1 1 1 1 1 1 1 1 1 ...
 $ groupsize: num  1 1 1 1 1 1 1 1 1 1 ...
 $ dist     : num  5 5 5 5 5 5 5 5 10 10 ...
 $ sample   : num  1 1 1 1 1 1 1 1 1 1 ...

And the M.t :

> head(M.t)
  siteID Length lead.
1     L1    500   low
2     L2    500   low
3     L3    500   low
> str(M.t)
'data.frame':   3 obs. of  3 variables:
 $ siteID: Factor w/ 3 levels "L1","L2","L3": 1 2 3
 $ Length: num  500 500 500
 $ lead. : Factor w/ 1 level "low": 1 1 1
Jonathan Hall
  • 75,165
  • 16
  • 143
  • 189
  • Without knowing anything about your data, I usually get "Inf" in my data whenever a function tries to divide something by zero. Could that be the case? – Shirin Elsinghorst Jul 28 '16 at 13:19
  • Welcome to Stack Overflow! Can you please include data that will provide us with a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) ? (Also, what package do `F.dfunc.estim` and `F.abund.estim` come from? They're not part of base R.) – Ben Bolker Jul 28 '16 at 13:26
  • Thanks for replying! Hmm, I don't think it's an issue of dividing by zero but I don't know exactly how the functions work so it's possible I'm missing something. I edited the question to included my data. The functions I'm trying are from the package "Rdistance". – S.calyptes Jul 28 '16 at 16:10

0 Answers0