R code for Hines 2010 model

questions concerning analysis/theory using program PRESENCE

R code for Hines 2010 model

Postby Justine33 » Thu Feb 12, 2015 1:32 pm

Hello everyone,

I was wondering whether there is an R code available for the Hines et al 2010 model with correlated detections?
I am interested in looking at the effects of covariates on th0 and th1 which unfortunately cannot yet me completed in PRESENCE. I would therefore be interested in doing further analysis within R.

If anyone has any info on this I would much appreciate it.
thank you.
Justine33
 
Posts: 10
Joined: Sun Jan 18, 2015 4:09 pm

Re: R code for Hines 2010 model

Postby jhines » Thu Feb 12, 2015 2:11 pm

What sort of code are you looking for? The likelihood function?

PRESENCE can model th0,th1 as functions of covariates, just like any other parameter.

Jim
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: R code for Hines 2010 model

Postby Justine33 » Thu Feb 12, 2015 4:39 pm

Thank you for the response.

If PRESENCE can do this that would be great. I am using PRESENCE 8.2 and currently one can only add covariates to th0pi(). Is it possibly a bug on this version that wont let me add covariates?

Thanks again for taking the time to answer this question. very much appreciated.
Justine33
 
Posts: 10
Joined: Sun Jan 18, 2015 4:09 pm

Re: R code for Hines 2010 model

Postby jhines » Thu Feb 12, 2015 6:32 pm

To make th0,th1 a function of a covariate, go to the first design matrix (with 'Occupancy' tab) and add a column (right-click, add column). In the new column, enter the covariate name in all rows with th0 (or th1).

That said, I'm not sure this is something that should be done. The th0's and th1's are there to distinguish a difference in local use at a site, based on local use of the previous site. By making these parameters a function of covariates, you're making them take on a range of values, which might overlap. The overlap might make the model unidentifiable as the high range of the th0's might be lower than the low range of the th1's. Although if you're using categorical covariates to distinguish groups of sites, it might be OK.
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: R code for Hines 2010 model

Postby darryl » Thu Feb 12, 2015 10:55 pm

Hi Jim,
I'm not quite following your concern. I can imagine there are going to be cases when there could be identifiability issues, but I'm not sure using covariates would be a problem in general for the reason you describe. The theta parameters are similar to colonization and extinction probabilities in multi-season models (though with 1 survey per season), and covariates work fine there.
Cheers
Darryl
darryl
 
Posts: 498
Joined: Thu Jun 12, 2003 3:04 pm
Location: Dunedin, New Zealand

Re: R code for Hines 2010 model

Postby jhines » Fri Feb 13, 2015 11:01 am

Hi Darryl,

There's a good chance my first instinct about the theta's is wrong. I was thinking about the theta's being like the p's in the mixture model. When they aren't fairly far apart, it becomes difficult to assign the p to group1 or group2 and the optimization blows up. I think I need to do some simulation testing to see if that's the case.

Jim
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: R code for Hines 2010 model

Postby Justine33 » Fri Feb 13, 2015 12:45 pm

Thank you Jim for the clear response, very helpful.

Apologies for not noticing that the th0 and th1 were under the Occupancy tab. Just one last simple thing I would like to varify in order to ensure I am proceeding correctly. If I for example am interested in only modelling psi() with a covariate, i.e. ps(Covariate)th0(.)th1(.)p(.)th0pi(.) I should make sure that the th0 and th1 rows are equal to zero.

Again thanks for clarifying this. much appreciated.
Justine33
 
Posts: 10
Joined: Sun Jan 18, 2015 4:09 pm

Re: R code for Hines 2010 model

Postby jhines » Fri Feb 13, 2015 1:21 pm

No, none of the rows should be all zeros, as that would constrain the parameter to zero (or whatever you fixed it to in the fixed parameters box). There should be a '1' in one of the columns for th0 and th1. For example, the model, psi(X),th0(.),th1(.) would have a design matrix of:

Code: Select all
    a1 a2 a3 a4
psi  1  X  0  0
th0  0  0  1  0
th1  0  0  0  1
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: R code for Hines 2010 model

Postby Justine33 » Tue Feb 17, 2015 9:21 am

Perfect. Thank you!
Justine33
 
Posts: 10
Joined: Sun Jan 18, 2015 4:09 pm


Return to analysis help

Who is online

Users browsing this forum: Google [Bot] and 2 guests

cron