I am using panel data and would like to count the number of individuals who have experienced a change in a binomial variable across 10 time periods. I.e. For individual i, at t =1var =0, at t=2 var = 1.In addition I would like to know the direction of the change. How many individuals moved from 0 to 1, and how many total observations are there? How many moved from 1 to 0, and how many total observations are there?