I have panel data of 10 firms over 10 years. id=1,2,....,10 and t=1,2,3.....,10.
Each firms joins a specific regulation for some years like firm 1 joins Regulation in time periods 3 and 4 and then 9 and 10. In each time period, there are many time varying covariates.
I am interested to analyze the factors which force a firm to join Regulation and stay under Regulation.
My data looks like

id yr reg profit empl
1 1 0 20 5
1 2 0 22 8
1 3 1 25 10
1 4 1 20 12
1 5 0 22 12
1 6 0 25 15
.....
2 1 0 120 5
2 2 1 122 8
2 3 1 125 10
2 4 1 120 12
2 5 0 122 12
2 6 0 125 15

I am unable to setup this data for survival analysis