Basics: How do I enter quantitative/numerical covariates?

questions concerning analysis/theory using program PRESENCE

Basics: How do I enter quantitative/numerical covariates?

Postby EmmaK » Fri Aug 19, 2016 6:52 am

I would like to put survey specific quantitative covariates into a single-season model in PRESENCE (e.g. temperature). Most are detection covariates, and some are occupancy ones.

I am not sure how to go about putting quantitative variables into the design matrix - the examples given are all for categorical ones. Do I simply put the relevant number into the appropriate position in the table, instead of 1 or 0?

Some of the measurements (e.g. grass height) are specific to both the survey occasion and the site - does this mean that I would need to treat each individual survey as a separate repeat occasion (with the rest of the sites as missing values for that column)?
EmmaK
 
Posts: 2
Joined: Thu Aug 18, 2016 1:55 pm

Re: Basics: How do I enter quantitative/numerical covariates

Postby jhines » Fri Aug 19, 2016 7:13 am

If the covariate is the same for all sites, you can put the value of the covariate into the design matrix. For example, if all sites are in the same area where grass height is 4 in survey 1, 2 in survey 2, 1 in survey 3, 6 in survey 4 and 9 in survey 5, the detection design matrix would be:

Code: Select all
-    b1    b2
p1  1    4
p2  1    2
p3  1    1
p4  1    6
p5  1    9


If the covariate is not the same for all sites, then you need to create a survey-covariate. For example, if you have 4 sites in area 1 with grass-heights as listed above, and 4 sites which had grass-heights of 3, 5, 7, 9, 11, then the survey-covariate would be:

Code: Select all
grassHt
site1  4 2 1 6 9
site2  4 2 1 6 9
site3  4 2 1 6 9
site4  4 2 1 6 9
site5  3 5 7 9 11
site6  3 5 7 9 11
site7  3 5 7 9 11
site8  3 5 7 9 11


The design matrix for detection would then be:

Code: Select all
-    b1    b2
p1  1   grassHt
p2  1   grassHt
p3  1   grassHt
p4  1   grassHt
p5  1   grassHt


When a numeric value appears in the design matrix, that value is used in the computation of the parameter. When a covariate name appears, the value of that covariate for each site/survey is used.
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Basics: How do I enter quantitative/numerical covariates

Postby EmmaK » Fri Aug 19, 2016 2:21 pm

Hurrah, all has become clear! Thanks :D
EmmaK
 
Posts: 2
Joined: Thu Aug 18, 2016 1:55 pm

Re: Basics: How do I enter quantitative/numerical covariates

Postby kbrunk » Mon Oct 29, 2018 5:37 pm

Ignore!
kbrunk
 
Posts: 12
Joined: Fri Oct 12, 2018 11:51 am

Re: Basics: How do I enter quantitative/numerical covariates

Postby darryl » Mon Oct 29, 2018 6:00 pm

Which year does the SST values of -0.03 apply to? Remember that the Cpsi and CR parameters are between season quantities. The value in the () of the parameter label denotes the season at the beginning of the interval, and you have the choice of whether you think the covariate value at the beginning or the end of the interval is a useful predictor for the parameter.

Cheers
Darryl
darryl
 
Posts: 495
Joined: Thu Jun 12, 2003 3:04 pm
Location: Dunedin, New Zealand

Re: Basics: How do I enter quantitative/numerical covariates

Postby kbrunk » Mon Oct 29, 2018 6:17 pm

Hey Darryl,

Thanks for the speedy reply! You got to it before I had even found a better way to word my question. Here's a quick summary for the rest of the board in case it can help anyone else:

I am building a multi-season, multi-state occupancy model, and I am interested in seeing if sea surface temperature (SST) has any effect on occupancy transitions. SST is a quantitative continuous covariate that has been standardized (mean of zero, sd of 1). I want to include this in an additive model along with state in the previous year and an indicator variable for habitat type.

My question is: what is the best way to include this quantitative covariate? I have 17 seasons of data, and a different SST value for each season, but only 16 "transition periods" in the design matrix. Would it be legitimate to create a survey-level covariate that has the same SST value for each site/survey within a season, but different values across seasons?
kbrunk
 
Posts: 12
Joined: Fri Oct 12, 2018 11:51 am

Re: Basics: How do I enter quantitative/numerical covariates

Postby jhines » Tue Oct 30, 2018 9:05 am

Presence only accepts site covariates (one value per site), or survey covariates (one value per site and survey). Mulit-season parameters for colonization and extinction require one value per site and season, so you can enter them as survey covariates, using only the 1st 16 columns (in your case). The remaining columns will be ignored by Presence.
jhines
 
Posts: 599
Joined: Fri May 16, 2003 9:24 am
Location: Laurel, MD, USA

Re: Basics: How do I enter quantitative/numerical covariates

Postby kbrunk » Tue Oct 30, 2018 10:14 am

Hey Jim,

Thanks a bunch for the response! Just to clarify, I have 17 seasons of data and 5 secondary sampling periods within each season. So, my SST survey covariate has 85 columns, and within each season the SST value is the same for all sites/surveys, but the SST values change across seasons. Basically, I have a spreadsheet where the SST value is the same for five columns, then changes for the next five columns, and so on. Are there advantages/disadvantages doing it this way versus adding the values directly to the design matrix after deciding which values are most likely to affect those "transition" periods that I am trying to model (per Darryl's advice above, sorry for deleting that original post). I've tried it both ways and it doesn't seem to be equivalent.

Thanks much for clarifying - you guys are the best!

KB
kbrunk
 
Posts: 12
Joined: Fri Oct 12, 2018 11:51 am

Re: Basics: How do I enter quantitative/numerical covariates

Postby darryl » Tue Oct 30, 2018 4:14 pm

What do you mean by 'both ways'?
darryl
 
Posts: 495
Joined: Thu Jun 12, 2003 3:04 pm
Location: Dunedin, New Zealand

Re: Basics: How do I enter quantitative/numerical covariates

Postby kbrunk » Tue Oct 30, 2018 4:43 pm

Hey Darryl,

I first had just created a survey covariate for SST, but with the same value for each survey/site in every season. This is the 85 column monstrosity I mentioned in my previous post. In the design matrix, then, I just included the "SST" survey covariate.

e.g.
a1 a2 a3 a4 a5 a6
psi0 1 0 0 0 0 0
Cpsi0(1) 0 1 0 0 SST Type
Cpsi1(1) 0 0 1 0 SST Type
Cpsi2(1) 0 0 0 1 SST Type
Cpsi0(2) 0 1 0 0 SST Type
Cpsi1(2) 0 0 1 0 SST Type
Cpsi2(2) 0 0 0 1 SST Type
Cpsi0(3) 0 1 0 0 SST Type
Cpsi1(3) 0 0 1 0 SST Type
Cpsi2(3) 0 0 0 1 SST Type


Then, I decided that might not be the appropriate way to do it because SST only varies by season, not by site or survey. So then I entered the SST directly into the design matrix, which seems to make more sense (and seemed to be what you advised in your reply).

e.g.
a1 a2 a3 a4 a5 a6
psi0 1 0 0 0 0 0
Cpsi0(1) 0 1 0 0 -0.43 Type
Cpsi1(1) 0 0 1 0 -0.43 Type
Cpsi2(1) 0 0 0 1 -0.43 Type
Cpsi0(2) 0 1 0 0 -0.69 Type
Cpsi1(2) 0 0 1 0 -0.69 Type
Cpsi2(2) 0 0 0 1 -0.69 Type
Cpsi0(3) 0 1 0 0 1.1 Type
Cpsi1(3) 0 0 1 0 1.1 Type
Cpsi2(3) 0 0 0 1 1.1 Type

I was just a little surprised by how different the results were from these two methods and wanted to make sure that method 2 was correct.Thanks and sorry for the marathon posts!

KB
kbrunk
 
Posts: 12
Joined: Fri Oct 12, 2018 11:51 am

Next

Return to analysis help

Who is online

Users browsing this forum: No registered users and 4 guests