Sorry this is a long message, but this is just to give everyone as much info as I can!
If you can help me resolve the problem with this DM I will be forever grateful! My model has four groups, females marked as juveniles, females marked as adults, males marked as juveniles and males marked as adults. I have two ages classes in both the marked as juveniles groups and due to transience detected in the GOF, I also have two age classes in females marked as adults. I also have trap dependence in the females marked as adults but not the males marked as adults and trap dependence in male and females marked as juveniles. Therefore there are two age classes in every group for phi and p, except males marked as adults. Therefore my global model is one with two age classes in males and females marked as juveniles and in females marked as adults and with trap dependence (i.e. two age classes in p) for males and females marked as juvenile and females marked as adults. I therefore created what I thought was the correct DM for this model, but the deviance differs from the PIM model by approximately 3 (see below):
........................................................................Delta AICc Model
Model ................................................................AICc AICc Weight Likelihood #Par Deviance
{phi(a2*a*s*t)p(m*a*s*t).......................................6069.107 75.51 0.00000 0.0000 370.00 2818.261 (PIM)
NO trans or trap dependence in marked as ADULT MALES}
{phi(a2*a*s*t)p(m*a*s*t).......................................6072.012 78.42 0.00000 0.0000 370.00 2821.166 (DM)
NO trans or trap dependence in marked as ADULT MALES}
Note: Parameter number is as a result of some parameters being fixed, but these are the same between the PIM and DM
Running the PIM with SIN or LOGIT gives the same deviance for PIM. Running the DM with logit link gives a different deviance than the PIM.
There are 33 capture occasions, therefore 31 columns for time in the DM. I will outline the DM for phi below and if you can see anywhere I am going wrong, please can you let me know it's driving me mad! The DM is the same for p so have left this out here.
Int=intercept
S=Sex (female or male)
M=marked as (i.e. marked as juvenile or marked as adult)
A=age (adult or juvenile)
T=time (33 capture occasions, therefore 31 columns in DM)
Int
S
M
A
T1 to T31
A.M (because here due to the transience there is a logical interaction between Age and Marking group as there are two age classes in the 'marked as adult female group)
S.M
S.A
S.T1 to S.T31
M.T2 to M.T31
A.T1 to A.T31
S.M.T2 to S.M.T31
S.A.T1 to S.A.T31
A.M.T2 to A.M.T31
Note, there is not 4 way interaction S.M.A.T because there is no age structure within the male marked as adult group, therefore there is no logical interaction between sex, marked as group and age. (i think this it right?!)
There are 221 columns and 221 rows for the phi structure of the DM (and the same for p). Below I have copied the structure for the part of the DM with the intercept, sex (1=female, 0=male), m=age at marking (1=marked as juvenile, 0=marked as adults), A=age (1=juvenile, 0=adult). T1-T3 are the first three time columns, showing that the adult age starts at T2 in the marked as juvenile groups. The rest of the columns follow as above, but the whole DM is far to big to copy.
Int SEX M A T1 T2 T3
1 1 1 1 1 0 0
1 1 1 1 0 1 0
1 1 1 1 0 0 1
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 1 0 0 0
1 1 1 0 0 1 0
1 1 1 0 0 0 1
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 0 0 0 0
1 1 1 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0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
1 0 0 0 0 0 0
Can anyone see any problems with the DM which could be giving the difference in deviance shown in the results?
Thank you very much for taking the time to read this message.
Oh and interestingly, the simpler model with age structure and trap dependence only in the 'marked as juvenile groups' works out fine, therefore the deviance is the same for model phiJ(a2*s*t)phiA(s*t)pJ(m*s*t)pA(m*s*t) whether is is constructed with a PIM or DM where phiJ=marked as juvenile survival and phi A=marked as adult survival.
Louise