Dear All, I found this question here (http://bbs.pinggu.org/forum.php?mod=...=1#pid52040796). Suppose that the data set is
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input str4 fdschool2 str1 fdschool3 int(fdsch2begin fdsch3begin) "A" "B" 15769 17776 "" "" . . "" "" . . "C" "D" 17410 19418 "E" "" 17045 . "F" "" 15223 . "G" "H" 11932 13027 "" "I" . 15027 end format %tdnn/dd/CCYY fdsch2begin format %tdnn/dd/CCYY fdsch3begin
- if `fdsch2begin' > `fdsch3begin', then we switch `fdschool2' and `fdschool3'.
- if only `fdsch2begin' is missing, then replace `fdsch2begin' and `fdschool2' with `fdsch3begin' and `fdschool3', respectively.
- if only `fdsch3begin' is missing, don't do anything.
- if both `fdsch2begin' and `fdsch3begin' are missing, don't do anything.
Comment