Thank you, Nick for sharing this code and many others. A huge help.
https://www.statalist.org/forums/for...2#post1369812:
I experienced the same by running the suggested code:
bysort company : replace turnover = turnover[_n-1] if missing(turnover)
It works if the var turnover is sorted so the replacing value is at the top.
The code only replaces the values below if the var contains missing values above.
/Anne
https://www.statalist.org/forums/for...2#post1369812:
I experienced the same by running the suggested code:
bysort company : replace turnover = turnover[_n-1] if missing(turnover)
It works if the var turnover is sorted so the replacing value is at the top.
The code only replaces the values below if the var contains missing values above.
/Anne
Comment