Thursday, September 29, 2022

Lag of variable with condition of not being misssing

I want to create the lag of a variable with one caveat. If it is missing, I want to use the previous period's value etc. So it is the most frequent non-missing lag. Any ideas?

No comments:

Post a Comment