Dear All, I found this question here (http://bbs.pinggu.org/forum.php?mod=...=1#pid54489763). The data is,
For each `stkcd', if any element in `university' also appears in `graduate1', then return 1 for this `stkcd', 0 otherwise. Thus, for stkcd=2, the returned value is 1, and for stkcd=3, the returned value is 0. Any suggestion is highly appreciated.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int stkcd str10 reptdt str1 name str12 university str2 investor1 str12 graduate1 2 "2008-06-25" "A" "" "BB" "MIT" 2 "2008-06-25" "B" "Harvard" "AA" "UCLA" 2 "2008-06-25" "C" "" "AA" "UCLA" 2 "2008-06-25" "D" "" "AA" "UCLA" 2 "2008-06-25" "E" "" "AA" "UCLA" 2 "2008-06-25" "F" "MIT" "AA" "UCLA" 2 "2008-06-25" "G" "" "AA" "UCLA" 3 "2008-07-27" "A" "" "BB" "MIT" 3 "2008-07-27" "B" "Boston" "AA" "UCLA" 3 "2008-07-27" "C" "" "AA" "UCLA" 3 "2008-07-27" "D" "" "AA" "UCLA" 3 "2008-07-27" "E" "" "AA" "UCLA" 3 "2008-07-27" "F" "Vanderbilt" "AA" "UCLA" 3 "2008-07-27" "G" "" "AA" "UCLA" end
Comment