Dear all,
I'm analyzing a panel data of 497 panels with 52 observations each ranging from years 1958-2009. The panel IDs are non-consecutive. I'm new to stata programming. Please guide me on how to go about it. One way I thought was to produce the row numbers 1-24024 using "gene seqnum=_n" and then using two forval loops, first one looping for values i=0/496 and the second one to check if the seqnum is in between i+1 and i+52 to perform a dfuller test. But I'm getting errors such as 'i' not found. Or is there a way to directly use the non-consecutive panel IDs and perform the tests? (can we usebysort id: dfullervarname)
Thank you!
I'm analyzing a panel data of 497 panels with 52 observations each ranging from years 1958-2009. The panel IDs are non-consecutive. I'm new to stata programming. Please guide me on how to go about it. One way I thought was to produce the row numbers 1-24024 using "gene seqnum=_n" and then using two forval loops, first one looping for values i=0/496 and the second one to check if the seqnum is in between i+1 and i+52 to perform a dfuller test. But I'm getting errors such as 'i' not found. Or is there a way to directly use the non-consecutive panel IDs and perform the tests? (can we usebysort id: dfullervarname)
Thank you!