Page 1 of 1

Seasonal Time Estimates

PostPosted: Thu Sep 01, 2011 2:43 pm
by Snook
Hey All,

I've done my best to go through Appendix C and the forum to find a solution to this, as I think it should be fairly simple, but haven't had any luck and now my brain is fried!

Anyways, I am running a simple CJS model with 9 occasions, and no covariates/groups. I can easily run the phi(.)p(.) and phi(t)p(t) models, but want to run a model with three seasonal periods. Specifically, I want estimate 1 to be Season 1, estimates 2:6 to be Season 2, and estimates 7:8 to be Season 3. Thus, the phi(season)p(season) model would have 3 phi and 3 p estimates.

This should be pretty simple, but I've either completely missed an example on this (if so, please let me know where the example is and I'll go from there!), or have gotten confused with the examples combining time and group effects.

Thanks!

Re: Seasonal Time Estimates

PostPosted: Thu Sep 01, 2011 3:52 pm
by bacollier
Snook,
Look at the dipper flood/no flood example. You need to see ?add.design.data.

Bret

Re: Seasonal Time Estimates

PostPosted: Thu Sep 01, 2011 6:08 pm
by Snook
Finally got it. I had tried that before, but couldn't get the estimates to run. Using the following code (for anyone interested), I was able to get seasonal time estimates

proc.CJS<-process.data(CJS.ch,model="CJS")
ddl<-make.design.data(proc.CJS)
ddl<-add.design.data(proc.CJS,ddl,parameter="Phi",type="time",bins=c(1,2,7,8),name="time",replace=TRUE,right=FALSE)
ddl<-add.design.data(proc.CJS,ddl,parameter="p",type="time",bins=c(2,3,8,9),name="time",replace=TRUE,right=FALSE)
Phi.bp=list(formula=~time)
p.bp=list(formula=~time)
mark(proc.CJS,ddl,model="CJS",delete=TRUE,model.parameters=list(Phi=Phi.bp,p=p.bp))

The part that screwed me up was the 'model.parameters' step, where I had to create Phi.bp and p.bp.

However, one strange thing happened, at the end of the model run, this message appeared:

"Cannot locate file mark001.out"

Re: Seasonal Time Estimates

PostPosted: Fri Nov 18, 2011 4:15 pm
by Snook
Another question regarding this I am working on the moment.

If I have 5 survival estimates (1,2,3,4,5), and want 1,2,4,5 to be equal and 3 to be different, how do I set these different? Working through the issue now, hopefully will figure out a solution soon.

Re: Seasonal Time Estimates

PostPosted: Fri Nov 18, 2011 6:12 pm
by bacollier
This is documented in the RMark appendix, you can manipulate the design data however you see fit, see C-29, have a look at the flood example.

Bret