Seasonal changes in survival

questions concerning analysis/theory using program MARK

Seasonal changes in survival

Postby maritli » Fri Jun 12, 2009 4:46 am

Hi, I'm analyzing a data set of capture-recapture collected over five days each month for 10 years (I'm working in Rmark). Using a Robust design model, I have the effect of time in years for survival which I have done by creating time intervals of 12 months in the design matrix (add.design.data). However, I'm also intrested in the time variation dependent on month to see if there may be seasonal changes in survival. Can I do this by adding dummy variables for the months to the design matrix?
I would really appreciate some advise :)

ML
maritli
 
Posts: 2
Joined: Thu Jun 11, 2009 8:31 am

Postby jlaake » Fri Jun 12, 2009 11:41 am

You can create dummy variables for month but it would be more efficient to create a factor variable for month and then use month in the formula and RMark will create all of the dummy variables (columns in the dm) for you. Post a summary of the design data (e.g., summary(ddl$Phi)) that you want to modify and I'll suggest some R code to create the variable.

--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Postby maritli » Mon Jun 15, 2009 3:34 am

Thanks for quick reply, here's the summary

summary(hew.ddl$S)
group cohort age time Cohort
1:7140 1 : 119 0 : 119 119 : 119 Min. : 0.00
2 : 118 1 : 118 118 : 118 1st Qu.: 16.00
3 : 117 2 : 117 117 : 117 Median : 34.50
4 : 116 3 : 116 116 : 116 Mean : 39.33
5 : 115 4 : 115 115 : 115 3rd Qu.: 59.00
6 : 114 5 : 114 114 : 114 Max. :118.00
(Other):6441 (Other):6441 (Other):6441
Age Time
Min. : 0.00 Min. : 0.00
1st Qu.: 16.00 1st Qu.: 59.00
Median : 34.50 Median : 83.50
Mean : 39.33 Mean : 78.67
3rd Qu.: 59.00 3rd Qu.:102.00
Max. :118.00 Max. :118.00

ML
maritli
 
Posts: 2
Joined: Thu Jun 11, 2009 8:31 am

Postby jlaake » Mon Jun 15, 2009 11:46 am

Hopefully I have the syntax correct here. The following should create a factor month variable for you, assuming monthly time intervals and starting at month 1. You can adjust as needed if different.

hew.ddl$month=factor(hew.ddl$S$Time-floor(hew.ddl$S$Time/12)*12+1)

--jeff
jlaake
 
Posts: 1480
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA


Return to analysis help

Who is online

Users browsing this forum: Bing [Bot] and 1 guest

cron