Hi Paige Miller, I wasn't able to use NMISS as I cannot find any similar examples. Here are what I have in my dataset. The year identifier -- fyear, the company identifier -- gvkey and the variable interested -- txt. I want the sum of txt over a five year period (year t to year t-4) and require at least three consecutive years of non-missing data. Could you please let me know what codes I need to use or give me some examples I can refer to? Thanks a lot. Jiaxin
... View more