Print

Print


I think this is a straightforward question but I cannot seem to find the answer.
I have some mark-resighting data where most individuals (gannets) were tagged as chicks and are therefore of known age. However some were intially tagged as adults and are therefore aged 3+ at initial capture.
I wanted to set up a model where the age-specific survival part is:
	for (i in 1:udot) { 
		for (j in first[i]:(k-1)){ 
			S[i,j]<-s.age[age[i]+j-first[i]+1]
			}}
			for (y in 1:30){
				s.age[y]~dbeta(1,1)
			}
k is last sampling period, udot is number of individuals, first[i] is the sampling period at initial capture.
However age[i] is mostly 0, but not known for some, i.e. in the data age[i]=c(0,0,0,0,NA,0,0,0... etc)

I tried something like:
age[i]~dgamma(3,0.5)
age.use<-round(age[i])
and then modelled:
S[i,j]<-s.age[age.use[i]+j-first[i]+1]
But I get the message that age.use[1] is not data. Also, I would like to truncate the imputed ages at a minimum of 3, and a maximum of about 15....
Many thanks
Andrew

-------------------------------------------------------------------
This list is for discussion of modelling issues and the BUGS software.
For help with crashes and error messages, first mail [log in to unmask]
To mail the BUGS list, mail to [log in to unmask]
Before mailing, please check the archive at www.jiscmail.ac.uk/lists/bugs.html
Please do not mail attachments to the list.
To leave the BUGS list, send LEAVE BUGS to [log in to unmask]
If this fails, mail [log in to unmask], NOT the whole list