I am currently reading about survival mark-recapture analyses and I wanted to better understand the design matrices involved... but I have never learnt much about matrices in general, so just wanted to clear up how this actually works.
Below, the design matrix (X) is make up of 2 columns of dummy variables (0 or 1's) which could be coding for sex, or adult etc. The first column corresponds to the intercept (beta 1) as you can see because it has all 1's. Whereas the second column would correspond to beta 2 which might be sex in this case (I find it easier to think about as y = B1 + B2Sex).
You end up with a vector of response values (Y's) that correspond to each row.
Below, the design matrix (X) is make up of 2 columns of dummy variables (0 or 1's) which could be coding for sex, or adult etc. The first column corresponds to the intercept (beta 1) as you can see because it has all 1's. Whereas the second column would correspond to beta 2 which might be sex in this case (I find it easier to think about as y = B1 + B2Sex).
You end up with a vector of response values (Y's) that correspond to each row.
There should be another column which is the error for each, but I left it out here for simplicity.
So, when you have your design matrix specifying an intercept, sex (as a dummy variable) and year 1 and year 2 (although it probably should go to year 4 but I was too lazy to add it it) then that is how you get your equation below! Each Yi value will give you the survival estimate for that specific sex in that specific year (e.g. row 1 is a survival estimate for males in year 1).
So, when you have your design matrix specifying an intercept, sex (as a dummy variable) and year 1 and year 2 (although it probably should go to year 4 but I was too lazy to add it it) then that is how you get your equation below! Each Yi value will give you the survival estimate for that specific sex in that specific year (e.g. row 1 is a survival estimate for males in year 1).
Here, beta 1 would be the average female survival, beta 2 is the difference between male and female survival. Beta 3 is survival in year 1 for both males and females, and beta 4 is survival for both in year 4. If we wanted to know how males and females differed each year we would have to include another parameter with an interaction (e.g. Year1*Sex and Year2*Sex).