Model output and groups starting at different times

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

Model output and groups starting at different times

Postby Mnat » Mon Dec 06, 2021 9:52 am

Hi,
I'm analysing survival of bats since 2003. The individuals in the dataset belong to six different colonies. Not each colony is captured from the beginning of the dataset.
When I process the data, I define one of the colonies which is captured from the beginning to be used as intercept.

Code: Select all
Mnat_ch$colony<-relevel(Mnat_ch$colony,ref = "WT1")


However, I'm a bit confused about the output:

92:p gMAAWB c2003 a1 t2 0.4998699 34.103246 0.7632867E-116 1.0000000
93:p gMAAWB c2003 a2 t2 0.5005587 57.331560 0.6227126E-195 1.0000000
94:p gMAAWB c2003 a3 t2 0.4999241 49.479929 0.3366644E-168 1.0000000
95:p gMAAWB c2003 a4 t2 0.4999636 24.706158 0.7563297E-84 1.0000000
96:p gMAAWB c2003 a5 t2 0.4992349 50.101268 0.2570549E-170 1.0000000
97:p gMAAWB c2003 a6 t2 0.4992148 54.512895 0.2448618E-185 1.0000000
98:p gMAAWB c2003 a7 t2 0.5559716 43.368219 0.3636272E-149 1.0000000
99:p gMAAWB c2003 a8 t2 0.4994105 58.036799 0.2460450E-197 1.0000000
100:p gMAAWB c2003 a9 t2 1.0000000 0.9207331E-05 0.9999819 1.0000180
101:p gMAAWB c2003 a10 t 0.9562008 0.0421730 0.7520690 0.9936758
102:p gMAAWB c2003 a11 t 1.0000000 0.2680045E-05 0.9999947 1.0000053
103:p gMAAWB c2003 a12 t 0.9838998 0.0159068 0.8951579 0.9977190
104:p gMAAWB c2003 a13 t 0.8964622 0.0362678 0.8010174 0.9490382
105:p gMAAWB c2003 a14 t 0.9005783 0.0372112 0.8004483 0.9533911
106:p gMAAWB c2003 a15 t 0.6572732 0.0550997 0.5428326 0.7559461

c2003 is the cohort marked at 2003, with age 1 at time t2.. i assume there should stand the year of recapture (2003,2004 ... ).
But what tells me that? The colony WB enters the data since 2011 so 2003 as a reference wouldn't be the best idea.
The output comes from the model Phi(~1)p(~-1 + colony:time), so the colony WB should have it's own intercept and I think that Mark correctly detects that the WB colony starts at 2011.
Thanks
Mnat
 
Posts: 18
Joined: Wed Apr 10, 2019 4:28 am

Re: Model output and groups starting at different times

Postby jlaake » Mon Dec 06, 2021 12:46 pm

First of all you are looking at real parameters and not the betas which would tell you about model structure. Second, a reference level only matters for an additive model. You are using a full interaction of the 2 factor variables which creates all combinations of the 2 factor variables and estimates a separate parameter for each combination without an intercept. You are doing that because RMark will correctly eliminate any combination that does not occur in the data like the WB colony before 2011. And yes they are recapture years.

I believe I have said this before but you should use model.matrix with your formula and the design datagrams or an example dataframe you create so you can understand how the design matrix is created. If you were using the MARK interface you would be forced to understand design matrices because you would have to create it manually. Using RMark is a quick way to avoid that manual operation but it is absolutely essential that you understand the design matrix each formula creates. I suggest that you find someone at your institution who can help you understand R formulas.

Jeff
jlaake
 
Posts: 1295
Joined: Fri May 12, 2006 12:50 pm
Location: Escondido, CA

Re: Model output and groups starting at different times

Postby Mnat » Tue Dec 07, 2021 3:41 am

Thanks for your reply.
True, it hurts to talk about an intercept in a formula where I subtract the intercept p(~-1 + colony:time), I'm sorry :oops: . That was probably not my day :shock:
But besides the above mentioned model I also build additive models, thats the reason why I define the reference colony in the beginning and why I stuck on the intercept on my last question. So this question fits to all of my models.
I started with a small training dataset and thereby focused on the design matrices, so understanding the formula or the design matrices is not the problem, I guess (even if I can absolutely understand that it seems so after my last post :? ).
I'm also aware of the beta and the real estimates.
Neverthelless, I just was unsettled that in the real estimates a c2003 is displayed for a colony which doesn't exist at 2003. But it seems to be fine.
Mnat
 
Posts: 18
Joined: Wed Apr 10, 2019 4:28 am


Return to RMark

Who is online

Users browsing this forum: No registered users and 1 guest

cron