offset argument and parboot

145 views
Skip to first unread message

Matt Giovanni

unread,
Sep 11, 2011, 2:04:57 AM9/11/11
to unmarked
Dear unmarked users-

I am using an offset(log(sampling_area)) argument in pcount model
statements. I'm wondering if this could influence the results of
parametric bootstrapping to assess model GOF. I'm consistently
getting very large mean differences between t0 and t_B, regardless of
species and model parameters. Thanks for your input. Best,

Matt

Richard Chandler

unread,
Sep 12, 2011, 10:21:44 AM9/12/11
to unma...@googlegroups.com
Hi Matt,

I just double checked the code and parboot does acknowledge offsets, so I don't think there is a problem. This little simulation doesn't suggest a problem either. Are there any unusual features of the data, eg outliers?



set.seed(1032)
R <- 100
J <- 10
x1 <- rnorm(R)
x2 <- runif(R, 0.5, 1)
lam <- exp(0 + -1*x1) * x2
N <- rpois(R, lam)
table(N)
y <- matrix(NA, R, J)
for(i in 1:R) {
    y[i,] <- rbinom(J, N[i], 0.5)
}

library(unmarked)
umf <- unmarkedFramePCount(y=y, siteCovs=data.frame(x1=x1, x2=x2))
summary(umf)

(m1 <- pcount(~1 ~x1 + offset(log(x2)), umf, K=50))
pb1 <- parboot(m1, nsim=100, report=5)

> pb1

Call: parboot(object = m1, nsim = 100, report = 5)

Parametric Bootstrap Statistics:
     t0 mean(t0 - t_B) StdDev(t0 - t_B) Pr(t_B > t0)
SSE 586             48             85.8        0.257

t_B quantiles:
     0% 2.5% 25% 50% 75% 97.5% 100%
SSE 349  408 479 526 587   757  785

t0 = Original statistic compuated from data
t_B = Vector of bootstrap samples




Richard






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

Matthew Giovanni

unread,
Sep 12, 2011, 11:46:43 AM9/12/11
to unma...@googlegroups.com
Hi Richard.  Thanks for investigating, as always.  I reviewed the data and do not see any conspicuous outliers.  Perhaps you have a moment to do some diagnostics on the model and bootstrap if I attach the csv?   I'd be grateful.  It's a relatively small data set (attached).  Here is some code:

umf=csvToUMF("BOBO.csv",long=FALSE,type="unmarkedFramePCount")
YPM2=pcount(~obs*visit ~YPM+YPM2+offset(log(AREA)),umf)
pb=parboot(YPM2,nsim=100,report=5)
pb
plot(pb)

Matt
BOBO.csv

Jeffrey Royle

unread,
Sep 12, 2011, 11:52:58 AM9/12/11
to unma...@googlegroups.com
hi Matt,
 The other explanation is that none of your models fit the data right?  Kind of a bummer, but also not out of the ordinary. 
 You could also try using log(AREA) is a covariate (with effect estimated).  It might be reasonable to expect that E[N] does not scale with area (e.g., diminishing returns, competition, etc..)
regards
andy

Matthew Giovanni

unread,
Sep 12, 2011, 12:07:21 PM9/12/11
to unma...@googlegroups.com
Hey Andy.  Yes, of course, but hopefully not!  I had not thought of using "area" as a covariate.  Something to think about.  Thanks for the tip.

Matt

Andy Royle

unread,
Sep 12, 2011, 12:14:54 PM9/12/11
to unma...@googlegroups.com, unma...@googlegroups.com
hi Matt,
 I didn't run any models but the data do appear more variable than Poisson. I can't remember if you said whether you tried NB but I would suggest that.
 Also a zero-inflated Poisson would be a good choice.  At some point we should add that capability. For now, I bet you could hack the code easily enough.....
regards
andy



From: Matthew Giovanni <matthew...@gmail.com>
To: unma...@googlegroups.com
Date: 09/12/2011 11:47 AM
Subject: Re: [unmarked] offset argument and parboot
Sent by: unma...@googlegroups.com


[attachment "BOBO.csv" deleted by Andy Royle/BRD/USGS/DOI]

Richard Chandler

unread,
Sep 12, 2011, 1:27:33 PM9/12/11
to unma...@googlegroups.com
Hi Matt,

I took a quick look and noticed several detection histories like y[249,] = (8,1,0). That suggests extremely low detection probability. Unless you have really good detection covariates, it will be hard to model such variation.

Richard

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



From: Matthew Giovanni <matthew...@gmail.com>
To: unma...@googlegroups.com
Date: 09/12/2011 11:47 AM
Subject: Re: [unmarked] offset argument and parboot
Sent by: unma...@googlegroups.com





[attachment "BOBO.csv" deleted by Richard Chandler/BRD/USGS/DOI]

Jeffrey Royle

unread,
Sep 12, 2011, 1:32:40 PM9/12/11
to unma...@googlegroups.com
I wonder if patterns like that are consistent across the data set which might suggest a decline in E[N]  or p....

Matthew Giovanni

unread,
Sep 12, 2011, 1:48:53 PM9/12/11
to unma...@googlegroups.com
Among the 10 grassland bird species, those highly variable detection histories are most common for Bobolink.  The best parameters for p(det bobo) are observer*(sampling)visit, such that predicted detectability varies among observers and across the 3 sampling visits, if that makes sense:

BOBO.png

SedgeWren.png
BOBO.png
SedgeWren.png
Reply all
Reply to author
Forward
0 new messages