Good morning I have a dataset of this type
I want to compute what is the longest period of time (consecutive years) for which Var X assumes values of 1. For example, according to the table this value should be 2 (Year 1991 and Year 1992).
Anyone can help me with that?
Thank You
| Year | Company | Var X |
| 1990 | AAA | 0 |
| 1991 | AAA | 1 |
| 1992 | AAA | 1 |
| 1993 | AAA | 0 |
| 1994 | AAA | 1 |
Anyone can help me with that?
Thank You

Comment