Hello everyone,
I would like to replace the first non-missing value of each ID (company) in a panel dataset and change it from whatever value it has to "missing."
This is the initial code:
and this is what I need:
My problem is I don't know how to identify first non-missing value. Is it possible?
Thank you very much!
I would like to replace the first non-missing value of each ID (company) in a panel dataset and change it from whatever value it has to "missing."
This is the initial code:
Code:
company year value 1 2000 . 1 2001 . 1 2002 10 1 2003 11 1 2004 15 2 2000 . 2 2001 7 2 2002 9 2 2003 6 2 2004 12 3 2000 20 3 2001 18 3 2002 17 3 2003 15 3 2004 19
Code:
company year value 1 2000 . 1 2001 . 1 2002 . 1 2003 11 1 2004 15 2 2000 . 2 2001 . 2 2002 9 2 2003 6 2 2004 12 3 2000 . 3 2001 18 3 2002 17 3 2003 15 3 2004 19
Thank you very much!

Comment