Adding SITE COVARIATES once the project is set up

questions concerning analysis/theory using program PRESENCE

Adding SITE COVARIATES once the project is set up

Postby Diego.Pavon » Mon Sep 19, 2011 5:04 am

HI you all,

I was wondering if there is a possibility to specify sites covariates "a posteriori". I am running some models in a project without site/survey specific covariates. However, after running already many models, I have realized that perhaps a I could include in the analysis another variable which would be site specific covariates. Does anybody know if that is possible?

Thank you

Diego
Diego.Pavon
 
Posts: 28
Joined: Thu Jul 21, 2011 4:44 am

Re: Adding SITE COVARIATES once the project is set up

Postby jhines » Mon Sep 19, 2011 2:03 pm

To add covariates, go to the 'View' menu and select 'Data', then change the number of covariates in the appropriate box. After entering the covariate info, save the 'pao' file in the project folder with the same name as the original file. It's important to save the file inside the project folder. If you originally used PRESENCE to create the pao file, it saved the file in the folder which contains the project folder, then copied it inside the project folder. The pao file outside of the project folder can be deleted as the one inside is used by the program.

After adding the covariate(s), exit PRESENCE and restart. The covariate(s) should be available to add to the design matrix.

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

Re: Adding SITE COVARIATES once the project is set up

Postby Diego.Pavon » Wed Oct 19, 2011 8:12 am

Hi
Thanks for the information!

However, after following your instructions, I still have problems. Now I have the sample covariate ready, but when I add it to the model PRESENCE gives me an error message:

"presence.exe has encountered a problem and needs to close. We are sorry for the inconvenience."

Do you know why? Perhaps some errors when codding the covariate?

This survey covariate is called "Period". This is because we want to have a variable coding for 2 periods (i.e. after and before 1997). Some changes in the properties of the vole cycle were observed since 1997, and therefore we want to explore if there is an effect of that. Thus, I though that making a covariate (factor with two levels) would be good approach. Then, all the surveys before 1997 are coded as 1, and all the surveys after 1997 are coded as 0.

1996-1 1996-2 1996-3 1997-1 1997-2 1997-3 1998-1 1998-2 1998-3 ........
Site 1 1 1 1 1 1 1 0 0 0
Site 2 1 1 1 1 1 1 0 0 0
Site 3 0 0 0 0 0 0 1 1 1

Is that a good approach? Is this maybe causing the error?

Thank you

Diego
Diego.Pavon
 
Posts: 28
Joined: Thu Jul 21, 2011 4:44 am

Re: Adding SITE COVARIATES once the project is set up

Postby jhines » Wed Oct 19, 2011 8:54 am

First, I don't see anything wrong with your survey-specific covariate. Perhaps there are some invisible characters included with the 1's and 0's. I'd be happy to check if for you if you wish.

I don't think you need this covariate anyway. Since detection probabilities are survey-specific, you can simply build a model with the design matrix which constrains the detection probabilities to be equal to one value before 1997, and another value after. Your detection design matrix would be:

Code: Select all
-        b1  b2
p(96,1)  1   0
p(96,2)  1   0
p(96,3)  1   0
p(97,1)  1   0
p(97,2)  1   0
p(97,3)  1   0
p(98,1)  0   1
p(98,2)  0   1
p(98,3)  0   1


So, detection probabilities for 96 and 97 will have one value, and detection probabilities for 98 will be another. Is this what you had in mind?

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

Re: Adding SITE COVARIATES once the project is set up

Postby Diego.Pavon » Thu Oct 20, 2011 4:25 am

Hi Jim,

Thank you! But I am not sure about your suggestion. In principle, you are right and this is what I want to model. Thus, I guess that your approach is correct. But, if I want to model for instance, an interaction between this period and the food abundance, the DM would look something like:
b1 b2 b3 b4 b5
p(96,1) 1 0 0.23 0.23 0
p(96,2) 1 0 0.23 0.23 0
p(96,3) 1 0 0.23 0.23 0
p(97,1) 1 0 0.45 0.45 0
p(97,2) 1 0 0.45 0.45 0
p(97,3) 1 0 0.45 0.45 0
p(98,1) 0 1 0.09 0 0.09
p(98,2) 0 1 0.09 0 0.09
p(98,3) 0 1 0.09 0 0.09

b1 and b2 are the "period" variable coding for before and after 1997; b3 would be the "food abundance index", and b4 an b5 would be the "interaction"(?). Is this correct?

Diego
Diego.Pavon
 
Posts: 28
Joined: Thu Jul 21, 2011 4:44 am

Re: Adding SITE COVARIATES once the project is set up

Postby jhines » Thu Oct 20, 2011 8:16 am

Diego,

There are two ways to build your design matrix. One way is to create an intercept column, year-effect column, food-effect column and interaction column. The design matrix would look like this:

Code: Select all
       b1 b2 b3 b4
p(96,1) 1 0 0.23 0
p(96,2) 1 0 0.23 0
p(96,3) 1 0 0.23 0
p(97,1) 1 0 0.45 0
p(97,2) 1 0 0.45 0
p(97,3) 1 0 0.45 0
p(98,1) 1 1 0.09 0.09
p(98,2) 1 1 0.09 0.09
p(98,3) 1 1 0.09 0.09

where b1=intercept, b2=year-effect, b3=food abund-effect, and b4=interaction=b2*b3.

The other way is to think of the two groups of years independently. The first two years would have intercept and food-effect columns, and the other year would have different intercept and food-effect columns. Here's the design matrix for that:

Code: Select all
       b1 b2 b3 b4
p(96,1) 1 0.23 0 0
p(96,2) 1 0.23 0 0
p(96,3) 1 0.23 0 0
p(97,1) 1 0.45 0 0
p(97,2) 1 0.45 0 0
p(97,3) 1 0.45 0 0
p(98,1) 0 0    1 0.09
p(98,2) 0 0    1 0.09
p(98,3) 0 0    1 0.09


where b1=intercept for 96-97, b2=food-effect for 96-97, b3=intercept for 98 and b4=food-effect for 98.

While you'll get different estimates of the betas (b1-b4), from the two methods, they should yield the same likelihood, AIC, and real parameter estimates (p's).

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


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests