Heterogeneity models - robust design

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

Heterogeneity models - robust design

Postby sergi_20 » Thu Jun 06, 2013 12:35 pm

Hi,

I am relatively new to RMark but have been using Mark a bit longer. I read the useful Appendix C and the Package RMark, but I still have a few doubts about the heterogeneity models.

I did run my data on the robust design with the three types of emigration models (random, markovian and no emigration) and I would like to see if my best models chance when I include the heterogeneity model (pi.session).

I don’t know why I am getting the same results with pi constant and with pi session (same estimates, AICc and Deviance)

Any thoughts?

Code: Select all
#convert inp file
rd.data=convert.inp("C:/R/RD/Qi 2-3 (5th fortnight-all days)_without calves and sightings(identified dolphins).inp",use.comments=T)

#Process data specifying primary and secondary capture occasions
time.intervals=c(0,0,0,0,0,3,0,0,3,0,3,0,0,0,3,0,0,0,0,0,3,0,0,0,0,3,0,0,0,0,3,0,0,0,12,0,0,0,0,0,0,3,0,0,3,0,0,3,0,0,0,0,0)
rd.process=process.data(rd.data,begin.time=1,model="RDFullHet",time.intervals=time.intervals)

#Create the design data
rd.ddl=make.design.data(rd.process)

#Markovian emigration
rd.markovian.models=function()
{
  S.dot=list(formula=~1)
  S.time=list(formula=~time)
  p.time.session=list(formula=~-1+session:time,share=TRUE)
  pi.session=list(formula=~session)
  pi.dot=list(formula=~1)
  GammaDoublePrime.dot=list(formula=~1)
  GammaDoublePrime.time=list(formula=~time)
  GammaPrime.dot=list(formula=~1)
  GammaPrime.time=list(formula=~time)
  N.session=list(formula=~session)
  cml=create.model.list("RDFullHet")
  results=mark.wrapper(cml,data=rd.process,ddl=rd.ddl,adjust=FALSE)
  return(results) 
}
rd.markovian.results=rd.markovian.models()


Markovian  emigration
                                                                             model npar     AICc DeltaAICc       weight Deviance
7           S(~1)Gamma''(~time)Gamma'(~time)pi(~1)p(~-1 + session:time)c()N(~session)   71 786.3054  0.000000 4.828916e-01 1378.507
8     S(~1)Gamma''(~time)Gamma'(~time)pi(~session)p(~-1 + session:time)c()N(~session)   71 786.3054  0.000000 4.828916e-01 1378.507
15       S(~time)Gamma''(~time)Gamma'(~time)pi(~1)p(~-1 + session:time)c()N(~session)   80 792.9870  6.681551 1.709894e-02 1358.612
16 S(~time)Gamma''(~time)Gamma'(~time)pi(~session)p(~-1 + session:time)c()N(~session)   80 792.9870  6.681551 1.709894e-02 1358.612
5              S(~1)Gamma''(~time)Gamma'(~1)pi(~1)p(~-1 + session:time)c()N(~session)   71 807.9944 21.688960 9.422190e-06 1400.196
6        S(~1)Gamma''(~time)Gamma'(~1)pi(~session)p(~-1 + session:time)c()N(~session)   71 807.9944 21.688960 9.422190e-06 1400.196
11          S(~time)Gamma''(~1)Gamma'(~time)pi(~1)p(~-1 + session:time)c()N(~session)   76 822.1561 35.850708 7.924417e-09 1399.760
12    S(~time)Gamma''(~1)Gamma'(~time)pi(~session)p(~-1 + session:time)c()N(~session)   76 822.1561 35.850708 7.924417e-09 1399.760
3              S(~1)Gamma''(~1)Gamma'(~time)pi(~1)p(~-1 + session:time)c()N(~session)   74 826.9691 40.663666 7.142442e-10 1410.461
4        S(~1)Gamma''(~1)Gamma'(~time)pi(~session)p(~-1 + session:time)c()N(~session)   74 826.9691 40.663666 7.142442e-10 1410.461
1                 S(~1)Gamma''(~1)Gamma'(~1)pi(~1)p(~-1 + session:time)c()N(~session)   67 852.2580 65.952612 2.303679e-15 1455.847
2           S(~1)Gamma''(~1)Gamma'(~1)pi(~session)p(~-1 + session:time)c()N(~session)   67 852.2580 65.952612 2.303679e-15 1455.847
13          S(~time)Gamma''(~time)Gamma'(~1)pi(~1)p(~-1 + session:time)c()N(~session)   70 862.9490 76.643613 0.000000e+00 1458.021
14    S(~time)Gamma''(~time)Gamma'(~1)pi(~session)p(~-1 + session:time)c()N(~session)   70 862.9490 76.643613 0.000000e+00 1458.021
9              S(~time)Gamma''(~1)Gamma'(~1)pi(~1)p(~-1 + session:time)c()N(~session)   71 863.0373 76.731910 0.000000e+00 1455.239
10       S(~time)Gamma''(~1)Gamma'(~1)pi(~session)p(~-1 + session:time)c()N(~session)   71 863.0373 76.731910 0.000000e+00 1455.239

#Random emigration
rd.random.models=function()
{
  S.dot=list(formula=~1)
  S.time=list(formula=~time)
  p.time.session=list(formula=~-1+session:time,share=TRUE)
  pi.session=list(formula=~session)
  pi.dot=list(formula=~1)
  GammaDoublePrime.GammaPrime.random=list(formula=~1,share=T)
  GammaDoublePrime.GammaPrime.session.random=list(formula=~time,share=T)
  N.session=list(formula=~session)
  cml=create.model.list("RDFullHet")
  results=mark.wrapper(cml,data=rd.process,ddl=rd.ddl,adjust=FALSE)
  return(results) 
}
rd.random.results=rd.random.models()

Random emigration
                                                                          model npar     AICc DeltaAICc       weight Deviance
7       S(~time)Gamma''(~time)Gamma'()pi(~1)p(~-1 + session:time)c()N(~session)   75 806.9297  0.000000 3.993942e-01 1387.486
8 S(~time)Gamma''(~time)Gamma'()pi(~session)p(~-1 + session:time)c()N(~session)   75 806.9297  0.000000 3.993942e-01 1387.486
3          S(~1)Gamma''(~time)Gamma'()pi(~1)p(~-1 + session:time)c()N(~session)   72 809.6872  2.757478 1.006058e-01 1399.002
4    S(~1)Gamma''(~time)Gamma'()pi(~session)p(~-1 + session:time)c()N(~session)   72 809.6872  2.757478 1.006058e-01 1399.002
6    S(~time)Gamma''(~1)Gamma'()pi(~session)p(~-1 + session:time)c()N(~session)   70 849.5659 42.636192 2.203283e-10 1444.638
1             S(~1)Gamma''(~1)Gamma'()pi(~1)p(~-1 + session:time)c()N(~session)   67 855.2729 48.343131 1.270060e-11 1458.862
2       S(~1)Gamma''(~1)Gamma'()pi(~session)p(~-1 + session:time)c()N(~session)   67 855.2729 48.343131 1.270060e-11 1458.862


Many Thanks
Sergi
sergi_20
 
Posts: 16
Joined: Wed Apr 03, 2013 1:01 pm

Re: Heterogeneity models - robust design

Postby jlaufenb » Thu Jun 06, 2013 1:01 pm

Hello Sergi,

You need to specify 'mixture' in the definition of the p submodel (e.g., p.time.session.mix=list(formula=~-1+session:time+mixture,share=TRUE)) in addition to defining the mixture proportion parameter. See ?edwards.eberhardt for an example of applying a finite mixture model in a closed population context.

Jared
jlaufenb
 
Posts: 49
Joined: Tue Aug 05, 2008 2:12 pm
Location: Anchorage, AK


Return to RMark

Who is online

Users browsing this forum: Google [Bot] and 2 guests