Transition/migration matrices

Hi! I hope you're all doing great.

I want to create monthly transition matrices based on the following data:
Date (end of month) ID (unique IDs) Category (from 1 to 5).

So, I need to count monthly transitions of IDs from one state to another and create matrices for each month.
I'm quite new to R, so I will be very grateful if someone could help me on this task.

Thanks!

Hi, welcome to the forum.
What form of help would you like ?

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.