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?
Related Posts with Lag of variable with condition of not being misssing
Assigning variable label when generating a new oneHi everyone, I am trying to generate a new variable named "new" using an existent variable named "ol…
outreg2 "long" format instead of "wide"Hi, I would like to have the dependent variables of my regressions listed in the left column and th…
Sorting ID’sHello, My data looks like this: Code: * Example generated by -dataex-. To install: ssc install da…
Creating Attrition (Non-response) Weights for Balanced PanelHi everyone, I am working with panel data which consists of three waves (3, 4, and 5) as below. I wa…
Calculate days from hospital admission to a procedure using National Inpatient Sample (NIS)Hi all, My goal is to calculate time (days) from admission to the time a patient first received a s…
Subscribe to:
Post Comments (Atom)
0 Response to Lag of variable with condition of not being misssing
Post a Comment