Temp and Precip

questions concerning analysis/theory using program MARK

Temp and Precip

Postby colbyslezak » Sun Aug 30, 2020 10:52 pm

Hi Everyone,

I'm doing an American woodcock nest survival analysis and would like to include temperature and precipitation in the analysis but I'm still having trouble after reading the gentle introduction and searching elsewhere online on how to format this type of data for mark? Is there a way to look at DSR and weather throughout the nesting season in R/RMARK.

Any help appreciated!

Thanks,

Colby
colbyslezak
 
Posts: 2
Joined: Thu Jan 04, 2018 3:00 pm

Re: Temp and Precip

Postby Rotella » Fri Sep 04, 2020 5:31 pm

Yes. Imagine, for example, that you collected nest-survival data on each day for 44 consecutive daily intervals from day 1 through day 45 for nests on 1 site and wanted to run a model with an intercept and a linear relationship between the log-odds of daily survival and daily precipitation amount. You could achieve the model by building a design matrix with 44 rows (e.g., a time-varying model) and 2 columns (1 for the intercept and 1 for the precipitation values). You could then fill in 1's in 1 column (for the intercept) and fill in the daily precipitation values in the 2nd column (the relevant precipitation value is entered into each row of the 2nd column of the design matrix; you might paste them in from Excel or type them all in). This is fairly similar to how the Gentle Introduction chapter describes building Model 5 (Model 5: DSR varies across the nesting season), except for in that model, the values would just be a sequence of numbers from 1, 2, 3, ..., 44 (for this example), whereas the precipitation values are the relevant daily values. You could then run that model using a logit link (or some other appropriate link of interest). You could do the same for temperature data (either replacing the precipitation values for a temperature model; or, adding a new column to have a model that includes both precipitation and temperature). If, however, different nests have different values for precipitation (and/or temperature), you would need to enter those as individual covariates and have (in this example) 44 values for precipitation and another 44 values for temperature, e.g., ppt1, ppt2, ..., ppt44 and tmp1, tmp2, ..., tmp44. In that case, instead of entering the values directly, you would enter the names of the covariates into each row: row 1 = ppt1, row 2 = ppt2, ..., row 44 = ppt44. I hope that helps!
Rotella
 
Posts: 73
Joined: Mon Jun 09, 2003 11:32 am

Re: Temp and Precip

Postby Rotella » Fri Sep 04, 2020 5:51 pm

I see that you asked about RMark. For that approach, my earlier comments still mostly apply, but you can use R and RMark tools to enter the values (e.g., bring the values into R and then add them to your design data if all nests share the same daily values for the time-varying covariates). RMark help files have examples of doing this for some data types, e.g., the Flood variable for the dipper example. If each nest has its own unique values then you'll need to use individual time-varying covariates (here again, my earlier comments apply) and follow examples of how to do that as well (a search on time varying individual covariates on this forum should help you on your way).
Rotella
 
Posts: 73
Joined: Mon Jun 09, 2003 11:32 am

Re: Temp and Precip

Postby birdnests » Tue Sep 12, 2023 12:08 pm

Hi There! May I please ask a question regarding this same topic? My set up for MARK is similar to the original post. I went through Model 1 and Model 2 examples in Ch 17 of Nest Survival Analysis with my data. For my Julian day and daily environmental variables like temperature, water level, wind speed, etc. I was trying to set it up like Model 5, as per instructions in this string. So starting with just Julian day (JDay1, JDay2, JDay3, etc.), I had named this individual covariate JDay1 from the very first Model 1 set up (in the "Enter Specifications for MARK Analysis" box). To do Model 5, I set up PIM to have 1 through 54 in the boxes, then the Design Matrix with 53 rows is generated with the 2 columns. I entered the B1 column as all 1's (ones). The B2 is going to be my Julian day (labeled as JDay1, JDay2, JDay3, etc down the column to JDay53). However, when I run, I get an error box that says the JDay2 entered is invalid. Where did I go wrong here?

In the beginning set up, starting from Model 1 in Chapter 17 Nest Survival Analysis, I named my individual covariates JDay1, Temp1, WaterL1, etc. Was I supposed to name the covariates for each 54 days for all individual covariates in the "Enter Specifications for MARK Analysis" box? In other words, in the "Enter Specifications for MARK Analysis" box for Individual covariates, was I supposed to pick the number that is the entire column # of my input (300+) and on the "Enter Individual Covariate Names", enter ALL the JDay1, JDay2, JDay3, etc as well as all the Temp1, Temp2, Temp3, etc, WaterL1, WaterL2, WaterL3, etc? I had used the Model 1 example for the "Enter Specifications for MARK Analysis" box with just JDay1, Temp1, and WaterL1 as the name labels. Thank you for any advice!!
birdnests
 
Posts: 7
Joined: Tue Sep 12, 2023 10:06 am

Re: Temp and Precip

Postby Rotella » Tue Sep 12, 2023 3:00 pm

If you are trying to run a model in which daily survival rates follow a temporal trend as in Model 5 that's presented in Chapter 17 of the Gentle Introduction to MARK, you would fill the first column in with 1’s and the second column in with numbers running from 1, 2, ..., 53 (assuming you had 54 occasions and so 53 daily survival intervals in your study). If you run such a model with a logit link, you'll estimate how much the log-odds of DSR change each day throughout your season. This is described on page 17-13 of Chapter 17 for the mallard example used in the chapter.
Rotella
 
Posts: 73
Joined: Mon Jun 09, 2003 11:32 am

Re: Temp and Precip

Postby birdnests » Wed Sep 13, 2023 9:34 am

Thank you, Dr. Rotella! And for the other time-dependent individual covariates (Temp1, Temp2, Temp3,...Temp54 and other daily environmental data), was I supposed to have entered all the names for each day in the "Enter Specifications for MARK Analysis" pop up box for individual covariate names? I was following Chapter 17 where in building the model example, the Individual Covariate Names #6 is just AgeDay1 on 17-9, and not all the day numbers were entered (AgeDay1, AgeDay2, AgeDay3, etc.). Thank you for any advice!
birdnests
 
Posts: 7
Joined: Tue Sep 12, 2023 10:06 am

Re: Temp and Precip

Postby Rotella » Wed Sep 13, 2023 11:18 am

If the daily environmental data values are the same for all nests, you can enter the values directly in the design matrix. For example, if you want to model daily survival rate as a function of daily temperature, you can use time-varying PIM values and a 2-column design matrix with 1's in the 1st column and the daily temperature values in the 2nd column. The temperature values can be pasted in from Excel or entered by hand. Alternatively, if you have individual covariates in your input file (e.g., Temp1, Temp2, ..., Temp54), you can enter those names in the 2nd column. These approaches are nicely explained in Chapter 11 of the Gentle Introduction to Program MARK in the sidebar that begins on page 11-30.
Rotella
 
Posts: 73
Joined: Mon Jun 09, 2003 11:32 am

Re: Temp and Precip

Postby Rotella » Wed Sep 13, 2023 11:20 am

Regarding the "AgeDay1" covariate, you only need to provide the age of a nest on day 1 of the study because the design matrix functions available in Program MARK can be used to calculate the age of a nest on any other day of the study from the initial age. That, of course, isn't true for covariates like temperature and precipitation. I hope that helps.
Rotella
 
Posts: 73
Joined: Mon Jun 09, 2003 11:32 am

Re: Temp and Precip

Postby birdnests » Wed Sep 13, 2023 12:41 pm

Thank you very much, Dr. Rotella! I will try these methods. The environmental data is different for various nests (but same for large #s of them) and I hadn't seen that sidebar in Ch 11 yet so I'll look at that. I also didn't realize the AgeNest1 referred to its own function so I had mirrored that as the individual covariate name for the environmental data I had but just for the #1 of each. Thank you very much for the advice!
birdnests
 
Posts: 7
Joined: Tue Sep 12, 2023 10:06 am


Return to analysis help

Who is online

Users browsing this forum: No registered users and 2 guests