Fun and Games with gdistsamp() Starting Values

225 views
Skip to first unread message

D.J. McNeil, Jr.

unread,
Dec 24, 2016, 1:03:31 PM12/24/16
to unmarked
Hello everyone!

I'm currently playing around with gdistsamp in unmarked and have encountered a very solid brick wall. I'm trying to run an analysis with transect data and I encounter issues with running my null model. As with many before, it seems that I'm failing to provide appropriate starting values. I've attempted to use a good variety of starting values but have zero clue how to get past this issue.

birdobs<-str(yhpaobs)-as.matrix(birddata[,2:5])
breaks<-c(0,100,200,300,400)
transect.length<-1000
sitecovs<-birddata[,6:7]
sitecovs[,"area"]<-((800*1000)/10000)

umf <- unmarkedFrameGDS(y = birdobs, survey="line", unitsIn="m", siteCovs=sitecovs,
                        dist.breaks=breaks, tlength=rep(transect.length, nrow(birddata)), numPrimary=1)

summary(umf)

unmarkedFrame Object

205 sites
Maximum number of observations per site: 4
Mean number of observations per site: 4
Number of primary survey periods: 1
Number of secondary survey periods: 1
Sites with at least one detection: 123

Tabulation of y observations:
   0    1    2    3    4    5    6    7    8    9   10   11   12   14   16   17   38 <NA>
 600    4  111   10   48    5   16    1    6    2    7    1    2    3    1    2    1    0

Site-level covariates:
  savanna          protection       area  
 dense: 96   protected  : 94   Min.   :80 
 open :109   unprotected:111   1st Qu.:80 
                               Median :80 
                               Mean   :80 
                               3rd Qu.:80 
                               Max.   :80 

p.null<-gdistsamp(~1,~1,~1, data=umf, output="abund", starts=c(0,0,5))
Error in optim(starts, nll, method = method, hessian = se, ...) :
  initial value in 'vmmin' is not finite

I understand the very basic concept of providing starting values but I have limited idea as to how to define them -- I also see (from other posts) that every analysis is different in this regard but surely there are some sorts of guidelines? I can't seem to find much regarding starting values in the AHM book (though it's a large body of literature so perhaps it's hidden in there somewhere). Perhaps I'm going wrong in some other way?

Thanks in advance for the assistance! I would love to get this figured out, especially as it seems that many before me have struggled with this issue.
Best,
D.J. McNeil

L. Jay Roberts

unread,
Jan 3, 2017, 4:12:14 PM1/3/17
to unmarked
Does it fit if you remove the starting values? Perhaps also try "se = FALSE" when you create the p.null model and then coef(p.null) to generate starting values for models with covariates. 

Your starting values for lambda (0), phi (0), and sigma (5) should be based on whatever you think is a reasonable expectation, and I see a couple problems with the numbers you chose. 

For lambda, I believe a starting value of 0.0 will create an error because it's on log scale. So start with a much larger number here (something like 2 or 4 perhaps) as it appears that your abundances are generally >1. 

For phi you will also want a higher starting value as this is on logit scale which implies availability ~ 0.5. If you feel that your birds are generally available (temporary emigration is low) across repeated visits then values up to ~4 might be more realistic. 

For sigma I typically see values in the 3-5 range with forest birds so your start of 5.0 seems reasonable. 

Hope this helps!

Jay

L. Jay Roberts

unread,
Jan 4, 2017, 1:18:41 PM1/4/17
to unmarked
FYI I and my colleagues have found that for most birds, as long as you implement basic field survey strategies to maximize consistency of detections (survey in early morning when activity is highest, do surveys well within breeding season after spring migration and before late summer redistributions, don't survey in bad weather, etc) that availability is generally very high. What appears to end up happening is that the gdistsamp model has trouble distinguishing phi and detection probability for data sparse species. Because of this we've settled on distsamp as the preferred alternative for several recent analyses. 
Reply all
Reply to author
Forward
0 new messages