trouble with ageclasses in GoF

posts related to the RMark library, which may not be of general interest to users of 'classic' MARK

trouble with ageclasses in GoF

Postby su2283 » Fri Mar 12, 2010 8:44 pm

Hi all,

I am trying to estimate c for my global model, which I have now learned has to be more complicated than originally anticipated.
I have tried no groups, using only sex as a group but after making better biological predictions I want to run RELEASE on the model : Phi(time.sex.age) p(time.sex.age)
Hopefully this will results in a c<3, which until the moment seem impossible. :(

In the model I would like to have age binned into 4 age classes:
pups(<1yrs old)
Jjuvs(1-4 yrs old)
young adults (5-8 yrs old)
old adults(9+ yrs old)
There are 11 encounter occasions (1987-1997), each occasion = 1 year of age, and all individuals where marked at age 0.

I have tried to design the data and model and export ch data from RMark, inserted the .inp file, appended the marknnnY.tmp file for the model (all of this worked) and have tried to run RELEASE in MARK.
Something must be wrong with my code, because RELEASE output shows high oversdispersion (c=22.174!!)and revising it thouroughly, my age classes are not there. It seems to only consider Phi(sex*time)p(sex*time) and not the age classes I made in the ddl.

I have revised Appendix C of Mark book, RMark Workshop notes 20099, html help and still struggling.

Below is the code, I would really, really appreciate a hand.

Thanks in advance!
-Susana

##
CJS.proc=process.data(xx, model="CJS", groups="sex", begin.time=1987, age.unit=1)
surv.ddl=make.design.data(CJS.proc)
surv.ddl=add.design.data(CJS.proc,surv.ddl,parameter="Phi",type="age",bins=c(0,1,4,8,10),name="agebin",replace=TRUE)
surv.ddl=add.design.data(CJS.proc,surv.ddl,parameter="p",type="age",bins=c(0,1,4,8,10),name="agebin",replace=TRUE)
levels(surv.ddl$Phi$agebin)=c("Pups","Juveniles","Young Adults","Old Adults")
levels(surv.ddl$p$agebin)=c("Pups","Juveniles","Young Adults","Old Adults")

Phi.time.sex.age=list(formula=~time*sex*agebin)
p.time.sex.age=list(formula=~time*sex*agebin)
my.global.model=mark(CJS.proc,surv.ddl,model.parameters=list(Phi=Phi.time.sex.age,p=p.time.sex.age))
export.chdata(CJS.proc,"global")
export.model(my.global.model)
##
su2283
 
Posts: 2
Joined: Thu Oct 29, 2009 3:49 pm
Location: University of British Columbia

Re: trouble with ageclasses in GoF

Postby jlaake » Fri Mar 12, 2010 10:14 pm

Release can only fit/test Phi(g*t)p(g*t) models,so the only way you can do what you want is to create groups that encompass your ages. Since you start off with all age=0, within a release cohort age=time. Thus, if in your data you have a field called say release.cohort then you can use it in your call to process.data with groups(eg groups=c("sex","release.cohort")).

Note that in R you can use release.gof (check name in help as I'm doing from memory) and you can skip the steps of exporting etc and call release directly. It is fitting a more complex model of sex:age:time (equivalent to sex:cohort:time) where age is a factor with every year as a level rather than 4 ages classes, but you can always use that as you global model and compare it to one with 4 ages classes, You'll only get Test2 as Test3 does not exist in this case.

There are some specific writeup on fitting models like age:time in this case as not all interactions are possible which is why I've used the notation age:time rather than age*time.

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

Re: trouble with ageclasses in GoF

Postby cooch » Sat Mar 13, 2010 8:42 am

jlaake wrote:Release can only fit/test Phi(g*t)p(g*t) models,so the only way you can do what you want is to create groups that encompass your ages. Since you start off with all age=0, within a release cohort age=time. Thus, if in your data you have a field called say release.cohort then you can use it in your call to process.data with groups(eg groups=c("sex","release.cohort")).


Jeff is correct, although you can do GOF testing using RELEASE for certain classes of TSM models - see p. 23 in Chapter 5.

However, I'll make a few suggestions:

1) have a look at U-CARE as an alternative to RELEASE - it has some features specific to TSM models

2) for any model (TSM or otherwise), you can estimate c-hat using the median c-hat approach (this can't be run from within RMark). Most work to date shows it is pretty robust - it is more compute intensive than RELEASE or U-CARE, and doesn't provide the individual contingency tables (which are occasionally helpful in diagnosing problems), but for estimation of c-hat, its the way to go.

3) make sure you have a thorough read of Chapter 5 (whether or not you're using RMark).
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University

Re: trouble with ageclasses in GoF

Postby jlaake » Sat Mar 13, 2010 11:12 am

To Evan's point 2, TSM is exactly what you have so reading that material could be very beneficial.

To his point 3, we put the material on RMark as an appendix specifically to send the message that you should read all of the other material on MARK before attempting to use RMark.

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

Re: trouble with ageclasses in GoF

Postby dhewitt » Tue Mar 16, 2010 5:33 pm

In point 2 of his response, Evan mentions that median c-hat can be run from within RMark. Unless I missed a big change in RMark, this is not true. (You could of course develop the code independently to do it in R outside of the canned functions in RMark. Good luck!) I think the more expedient approach would be to export the global model from RMark, import same into MARK, and then run median c-hat via the usual MARK route.
dhewitt
 
Posts: 150
Joined: Tue Nov 06, 2007 12:35 pm
Location: Fairhope, AL 36532

Re: trouble with ageclasses in GoF

Postby jlaake » Tue Mar 16, 2010 5:41 pm

I think Evan meant "can't be run in RMark". You must use export.MARK and then run from the MARK gui. --jeff
jlaake
 
Posts: 1479
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: trouble with ageclasses in GoF

Postby cooch » Tue Mar 16, 2010 6:29 pm

jlaake wrote:I think Evan meant "can't be run in RMark". You must use export.MARK and then run from the MARK gui. --jeff


Correct...I'll edit my post.
cooch
 
Posts: 1652
Joined: Thu May 15, 2003 4:11 pm
Location: Cornell University


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron