year-dependence in pcountOpen

245 views
Skip to first unread message

Kery Marc

unread,
Sep 30, 2011, 7:27:31 AM9/30/11
to unma...@googlegroups.com
Dear colleagues,

I would like to fit a Dail-Madsen Nmix model using pcountOpen() with year-dependent parameters of recruitment, survival and detection. I feel a bit challenged with how to organize the data with unmarkedFramePCO(). I presume that I have to provide the values of YEAR as an M-by-T matrix of yearlySiteCovs, but then don't I need one version of YEAR for recruitment and survival (with T-1 columns) and another, with T columns, for detection ?

Any help is greatly appreciated.

Kind regards -- Marc

______________________________________________________________

Marc Kéry
Tel. ++41 41 462 97 93
marc...@vogelwarte.ch
www.vogelwarte.ch

Swiss Ornithological Institute | Seerose 1 | CH-6204 Sempach | Switzerland
______________________________________________________________

***** Check out my recent book on Bayesian statistical modeling at www.mbr-pwrc.usgs.gov/pubanalysis/kerybook

***** Watch out for our new book (due Dec 2011): Kéry & Schaub, Bayesian Population Analysis using WinBUGS, Academic Press;
www.vogelwarte.ch/bpa


Richard Chandler

unread,
Sep 30, 2011, 8:36:50 AM9/30/11
to unma...@googlegroups.com
Hi Marc,

It would be rather cruel if it was that difficult. Fortunately, you just need to create one M X T matrix and supply it as a yearlySiteCov. Continuing with the example on the help page, try this:

year <- matrix(as.character(1:5), 50, 5, byrow=TRUE)
umf <- unmarkedFramePCO(y=y, yearlySiteCovs=list(year=year), numPrimary=5)
m2 <- pcountOpen(~1, ~year, ~year, ~year, umf, K=20, control=list(trace=TRUE, REPORT=1)) # K should be higher


On a separate note, I wonder if the parameters are identifiable in this case. It shouldn't be a problem if you have "robust design" data, but I would suggest doing some simulations to check out the properties of the model when you have year-specific gamma/omega/p and no secondary samples. If you do look into this, please let us know what you find. And if you are interested in some simulation code, there are several simulation tests in a the file that comes with unmarked:  /R/library/unmarked/inst/unitTests/sim.pcountOpen.R, which is also here: https://github.com/rbchan/unmarked/blob/master/inst/unitTests/sim.pcountOpen.r .

Hope you are doing well.

Richard

p.s. a new version of unmarked with a faster pcountOpen will be out soon.

_____________________________________
Richard Chandler, post-doc
USGS Patuxent Wildlife Research Center
301-497-5696



From: Kery Marc <marc...@vogelwarte.ch>
To: "unma...@googlegroups.com" <unma...@googlegroups.com>
Date: 09/30/2011 07:27 AM
Subject: [unmarked] year-dependence in pcountOpen
Sent by: unma...@googlegroups.com


Kery Marc

unread,
Sep 30, 2011, 11:21:19 AM9/30/11
to unma...@googlegroups.com
Dear Richard,

thank you for not being cruel, for helping so quickly and for suggesting that this model may have identifiabilty problems. I have set up a simple simulation and will report back tomorrow.

Kind regards -- Marc

________________________________________
From: unma...@googlegroups.com [unma...@googlegroups.com] on behalf of Richard Chandler [rcha...@usgs.gov]
Sent: 30 September 2011 14:36
To: unma...@googlegroups.com
Subject: Re: [unmarked] year-dependence in pcountOpen

Kery Marc

unread,
Oct 1, 2011, 1:20:23 PM10/1/11
to unma...@googlegroups.com, Schaub Michael
Dear Richard,

so I ran a small simulation study (with 100 rep data sets) on the DM-Nmix model with full time-dependence in the parameters absent a robust design. Here are the descriptors of the data sets (I varied all params quite considerably): M = 50, T = 5, lambda = 2, gamma = c(0.5, 1, 0.5, 1), omega = c(0.6, 0.9, 0.6, 0.9), p = c(0.6, 0.8, 0.6, 0.8, 0.6).

Here is a summary of the estimates from the 100 simreps, with the last two columns the mean and the sd over the 100 estimates. The raw estimate is the mean count in the first year (-99.0 denote NAs).

> print(cbind(ss1, ss2), dig = 3)
TRUTH Raw esti DM Esti ss2
Mean abundance (lambda) 2.0 1.2 2.220 0.523
Recruitment (gamma 1) 0.5 -99.0 0.410 0.505
Recruitment (gamma 2) 1.0 -99.0 0.841 0.514
Recruitment (gamma 3) 0.5 -99.0 0.644 0.442
Recruitment (gamma 4) 1.0 -99.0 0.824 0.551
Survival (omega 1) 0.6 -99.0 0.633 0.174
Survival (omega 2) 0.9 -99.0 0.858 0.162
Survival (omega 3) 0.6 -99.0 0.653 0.171
Survival (omega 4) 0.9 -99.0 0.827 0.156
Detection probability (p 1) 0.6 -99.0 0.564 0.136
Detection probability (p 2) 0.8 -99.0 0.794 0.184
Detection probability (p 3) 0.6 -99.0 0.675 0.161
Detection probability (p 4) 0.8 -99.0 0.788 0.179
Detection probability (p 5) 0.6 -99.0 0.664 0.147

From this, I would tentatively conclude that the params are identifiable even with full time-dependence and no RD, but that the estimates are probably rather crappy. From looking at the variability among the 100 data sets (i.e., the sd in the last column), it appears that the colonization params are particularly shaky.

This is a first stab only, and over the next months or so I'd be interested to look more into the capabilities of the model for particular data formats. More on that later.

Thanks a lot for providing such conventient code for the DM Nmix model in unmarked !

Kind regards -- Marc

______________________________________________________________

Swiss Ornithological Institute | Seerose 1 | CH-6204 Sempach | Switzerland
______________________________________________________________

***** My introductory book on Bayesian statistical modeling: Kéry (2010), Introduction to WinBUGS for Ecologists, Academic Press; see www.mbr-pwrc.usgs.gov/pubanalysis/kerybook

***** Our new book is available NOW: Kéry & Schaub (2012), Bayesian Population Analysis using WinBUGS, Academic Press; see www.vogelwarte.ch/bpa


________________________________________
From: unma...@googlegroups.com [unma...@googlegroups.com] on behalf of Richard Chandler [rcha...@usgs.gov]
Sent: 30 September 2011 14:36
To: unma...@googlegroups.com
Subject: Re: [unmarked] year-dependence in pcountOpen

Hi Marc,

Richard Chandler

unread,
Oct 3, 2011, 9:45:08 AM10/3/11
to unma...@googlegroups.com, Schaub Michael
Hi Marc,

Your results don't look as bad as I expected, but like you say, they aren't great either. I will continue to play devil's advocate because it goes against my intuition that the parameters could be identifiable in this case. My understanding is that p is only identifiable because of the constraints placed upon the population dynamics. For example, when gamma and omega don't vary (are scalars), the population should reach equilibrium rather quickly. Deviations from this would be information about detection probability. But if gamma and omega are year-specific, then the population dynamics are nearly unconstrained, so it's hard to see where information about p could come from (unless you had RD data). But this is just my intuition... which is often wrong.

I guess the problem is that it is very hard to demonstrate identifiability.  If you do pursue this some more, it might be worth checking to see how often the hessian can be inverted (do you get SEs if se=TRUE), and how sensitive the estimates are to starting values. And maybe David Dail would be worth contacting to see if he has looked into this.

It would be great to get to the bottom of this so that we can block certain models from being fitted if need be. Thanks so much for working on this -- the properties of this model need more study.

Richard




-----unma...@googlegroups.com wrote: -----

To: "unma...@googlegroups.com" <unma...@googlegroups.com>
From: Kery Marc <marc...@vogelwarte.ch>
Sent by: unma...@googlegroups.com
Date: 10/01/2011 01:20PM
cc: Schaub Michael <michael...@vogelwarte.ch>
Subject: RE: [unmarked] year-dependence in pcountOpen

Kery Marc

unread,
Oct 5, 2011, 8:34:50 AM10/5/11
to unma...@googlegroups.com, Schaub Michael

Dear Richard,

 

from looking casually at what unmarked did, I can confirm that I quite often got NaN’s for the SE. So you may well be right in that. For the moment, I don’t think that I will pursue this any further. If we go further into it, I’d be happy to hear your comments.

 

Thanks again and kind regards  ---  Marc

 

 

 

 

 

 

Von: unma...@googlegroups.com [mailto:unma...@googlegroups.com] Im Auftrag von Richard Chandler
Gesendet: Montag, 3. Oktober 2011 15:45
An: unma...@googlegroups.com
Cc: Schaub Michael
Betreff: RE: [unmarked] year-dependence in pcountOpen

 

Hi Marc,

Your results don't look as bad as I expected, but like you say, they aren't great either. I will continue to play devil's advocate because it goes against my intuition that the parameters could be identifiable in this case. My understanding is that p is only identifiable because of the constraints placed upon the population dynamics. For example, when gamma and omega don't vary (are scalars), the population should reach equilibrium rather quickly. Deviations from this would be information about detection probability. But if gamma and omega are year-specific, then the population dynamics are nearly unconstrained, so it's hard to see where information about p could come from (unless you had RD data). But this is just my intuition... which is often wrong.

I guess the problem is that it is very hard to demonstrate identifiability.  If you do pursue this some more, it might be worth checking to see how often the hessian can be inverted (do you get SEs if se=TRUE), and how sensitive the estimates are to starting values. And maybe David Dail would be worth contacting to see if he has looked into this.

It would be great to get to the bottom of this so that we can block certain models from being fitted if need be. Thanks so much for working on this -- the properties of this model need more study.

Richard




Reply all
Reply to author
Forward
0 new messages