interaction terms

questions concerning analysis/theory using program PRESENCE

interaction terms

Postby Emily » Tue May 06, 2008 3:59 pm

I am running detectability models in Presence and have a question on how to set up an interaction term in the design matrix. I am using a single-season model have 4 covariates one of which is a dummy variable for "era". This era term refers to when the sampling occurred (we are conducting a resurvey of sites sampled in the early 1900's). My question is, can I set up a interaction term (i.e., era*trapeffort) in Presence or do I have to do this outside of Presence and add it as another covariate? Thank you!
Emily
 
Posts: 2
Joined: Thu May 01, 2008 4:01 pm
Location: UC Berkeley

interaction in PRESENCE

Postby jhines » Tue May 06, 2008 4:36 pm

Yes, You'll have to add covariates for all combinations of era and trapeffort, then use them in the design matrix. The easiest way is to do in Excel, then paste into PRESENCE. The number of columns in the design matrix for a model with interaction should be the product of the number of era categories and the number of trapeffort categories. For example, if era is 0=1900s, 1=2000's, and trapeffort is 0=low, 1=med, 2=hi, then there would be 6 columns in the design matrix.

Of course, this model assumes no relationship between the 3 trapeffort values.
jhines
 
Posts: 632
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Postby Emily » Wed May 07, 2008 2:53 pm

Okay, great. Thank you. I have one more question.

I am trapping small mammals over a maximum of 8 nights at each site. I have fitted a trend line for my detectability estimate over these nights. For example, in my DM I have the intercept term and then 1, 2, 3, 4, 5, 6, 7, 8 in the next column so Presence basically fits a slope (beta) of this trend over the visits. I want to look at the effect of "era" on this trend. The question I want to get at is: Is "era" effecting trapping success (trend in detections over 8 trapnights)? I don't know how to set up a era*trend interaction term. I understand that I will have to do it in excel but I am not clear how to do it. Any advise would be much appreciated! Thanks.
Emily
 
Posts: 2
Joined: Thu May 01, 2008 4:01 pm
Location: UC Berkeley

iiteraction model

Postby jhines » Wed May 07, 2008 4:20 pm

If you have two values for era, then you could have two models with era and trapeffort: phi+TE (no interaction, think parallel lines on a graph), and phi*TE(interaction, non-parallel lines). For the era+TE model, the DM would be:
.... B1 B2 B3
p1 1 0 era
p2 1 1 era
p3 1 2 era
p4 1 3 era
p5 1 4 era
p6 1 5 era
p7 1 6 era
p8 1 7 era

In the output, B1 will be the intercept for the first era, and B2 will be the slope (on a logit scale) for the first era, and B3 will be the difference between the first era line and the 2nd era line.

For the era*TE model, the DM would be:
... B1 B2 B3 B4
p1 1 0 era 0
p2 1 1 era era
p3 1 2 era era2
p4 1 3 era era3
p5 1 4 era era4
p6 1 5 era era5
p7 1 6 era era6
p8 1 7 era era7

where era2 is an additional covariate with the value of 2*era, and era3 is another covariate with the value 3*era,.... So, you'll have to create 6 new covariates (era2-era7) and add them to the project.

In the output, B1-b3 are as described above, and B4 is the difference between the slope for the first era and the 2nd era.
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 4 guests