backTransform function in unmarked versus plogis in R

1,296 views
Skip to first unread message

Ammie Kalan

unread,
Mar 31, 2014, 4:06:14 AM3/31/14
to unma...@googlegroups.com
Dear unmarked users,

I am currently comparing naive occupancy calculations of a dataset with the occupancy probability I obtain using 'occu', single season occupancy models. which account for detection p. It is suggested in the package that the 'backTransform' function will transform the estimates of the occu model back to the original scale. As I understand it, one could alternatively use the 'plogis' function in R which transforms estimates from the logit scale. Sometimes backTransform and plogis will provide me with similar results, but other times not, particularly when the occupancy probability approaches 1. Why is this and which function is more accurate? Two simple examples to illustrate my confusion (for two different data sets).

1) backTransform and plogis give different calculations for the minimum and maximum occupancy probability of a model. Which is more 'correct'?

null=occu(~1 ~1, data=kk3)

occu(formula = ~1 ~ 1, data = kk3)

Occupancy (logit-scale):
 Estimate    SE    z P(>|z|)
    0.904 0.687 1.32   0.188

backTransform(null, 'state')
 Estimate    SE LinComb (Intercept)
    0.712 0.141   0.904           1

max.occup=0.712+0.141
0.853

min.occup=0.712-0.141
0.571

#using plogis

max.occu= plogis(0.904 +0.687)
0.8307567

min.occu= plogis(0.904-0.687)
0.5540381


2) backTransform uses the link scale (I am not too sure about this) and therefore is not constraining occu p between 0 and 1. In this example it suggests a maximum occu p just over 1 whereas the plogis estimate is well below 1.

null=occu(~1 ~1, data=bb3)

occu(formula = ~1 ~ 1, data = bb3)

Occupancy (logit-scale):
 Estimate   SE    z P(>|z|)
     3.06 1.15 2.66 0.00771

backTransform(null, type='state')
Estimate     SE LinComb (Intercept)
    0.955 0.0491    3.06           1
   
max occu p = 0.955 + 0.0491
1.0041

min occu p = 0.955 - 0.0491
0.9059

#plogis gives different min and max than backTransform

max.occu= plogis(3.06+1.15)
0.9853708

min.occu = plogis(3.06-1.15)
0.8710191

These differences seem too big to me to be just a result of rounding errors. If anyone can shed some light on this and tell me what is the best way to obtain the min and max estimate for occupancy probability from a given model result using the standard error I would be very grateful!

best,
ammie

Kery Marc

unread,
Mar 31, 2014, 5:24:17 AM3/31/14
to unma...@googlegroups.com

Dear Ammie,

 

both backTransform and plogis will give exactly the same result in terms of the point estimate. In addition, the predict function will also do that (see below). What I am not sure about, and what I have never understood, are the SE‘s for the backtransformed estimates. You can’t use them in the way you do, because, as you see, this will sometimes result in inadmissible values >1. Perhaps somebody else can explain what these SE’s mean.

 

In all cases, the linear modeling in both parts of the occupancy model (detection, occupancy) takes place on the logit scale. That is, for occupancy, you have log(psi / (1-psi)) = alpha (for an intercept-only model) or …. = alpha + beta * covariate, for a logistic regression on some covariate. I think that I would generally use the predict function to get estimates of occupancy for your model on the probability scale, along with 95% Cis. Then, you can report these or plot them, for a model with covariates.

 

Kind regards  ---  Marc

--
You received this message because you are subscribed to the Google Groups "unmarked" group.
To unsubscribe from this group and stop receiving emails from it, send an email to unmarked+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ammie Kalan

unread,
Mar 31, 2014, 6:30:43 AM3/31/14
to unma...@googlegroups.com
Hi Marc,

Thanks a lot for your quick reply! I do hope someone else can give me some further insight into why the SE's from the backTransform estimate cannot be interpreted as plus or minus the point estimate. Since my purpose is to compare my naive occupancy estimate with the occupancy p I obtain from unmarked, it is important for me to know the variation associated with the point estimate I obtain using 'occu'.

With regards to the predict function, I am already planning on using this but as I understand it the function is only helpful when you have a covariate in the model. My 'best' model does not include any covariates for occupancy probability, only for detection, hence why I think the predict function is not particularly helpful here.

Does anyone know of another way I could calculate reliable SE's for the occupancy estimate when no covariates are modeled?

Many thanks,
ammie

Kery Marc

unread,
Mar 31, 2014, 6:34:47 AM3/31/14
to unma...@googlegroups.com

Dear Ammie,

 

Two comments:

-          I did NOT say the Ses from backTransform weren’t reliable : I am sure they are, only I don’t understand how they are computed.

-          You can use function predict also for an intercept-only model and get 95% Cis.  As a characterisation of the uncertainty of the estimate, they are perhaps to be preferred.

 

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
______________________________________________________________

*** Intro book on Bayesian statistical modeling: Kéry, 2010, Introduction to WinBUGS for Ecologists, Academic Press; see www.mbr-pwrc.usgs.gov/pubanalysis/kerybook
*** Book on Bayesian statistical modeling: Kéry & Schaub, 2012, Bayesian Population Analysis using WinBUGS, Academic Press; see
www.vogelwarte.ch/bpa 
*** Upcoming workshops:
http://www.phidot.org/forum/viewforum.php?f=8

Ammie Kalan

unread,
Mar 31, 2014, 6:46:39 AM3/31/14
to unma...@googlegroups.com
Hi Marc,

Thanks for the clarification! I will take your advice and use the predict function.

best,
ammie
Reply all
Reply to author
Forward
0 new messages