I'm cleaning data for use in a cumulative abnormal returns M&A event study, and attempting to retain in my stock market data only those companies (identified by their unique co_code observation) which have associated M&A events. I have compiled code to keep all the variables and retain only those with co_code observations drawn from my cleaned M&A data, then taken what I thought were the correct steps to guide Stata to keep the associated code observations, as follows:
Code:
keep co_code company_name co_stkdate bse_closing_price bse_returns nse_closing_price nse_returns tyear tmonth fisc_year keep if co_code=="365" | "3990" | "6484" | "7068" | "11063" | "18396" | "19408" | "21042" | "21420" | "23354" | "23668" | "24685" | "28469" | "28932" | "29678" | "33769" | "35548" | "37451" | "41557" | "42443" | "46286" | "47542" | "47757" | "49262" | "50505" | "51238" | "54885" | "62425" | "66192" | "68925" | "69565" | "70319" | "73325" | "73572" | "74600" | "74601" | "76120" | "76120" | "76722" | "81023" | "81038" | "82000" | "830108" | "3015" | "83025" | "85447" | "85649" | "86809" | "92894" | "94136" | "96379" | "96387" | "97115" | "97156" | "98445" | "98457" | "98659" | "98918" | "98964" | "99558" | "99667" | "100644" | "101070" | "102509" | "105677" | "108074" | "108841" | "109300" | "109809" | "112333" | "114749" | "119790" | "121140" | "122573" | "122902" | "122948" | "127106" | "136444" | "136444" | "141598" | "144626" | "144626" | "145425" | "146460" | "149369" | "150573" | "159120" | "159120" | "163705" | "165563" | "165693" | "170018" | "171151" | "172333" | "173299" | "174488" | "175632" | "175679" | "180201" | "182141" | "183791" | "190511" | "191865" | "193553" | "194815" | "196588" | "200352" | "201554" | "204843" | "205370" | "208602" | "212914" | "214742" | "215829" | "223422" | "224351" | "226821" | "228346" | "232916" | "236460" | "236667" | "237266" | "242059" | "243455" | "244856" | "248129" | "248136" | "249332" | "249469" | "249597" | "251109" | "253375" | "256146" | "257613" | "265398" | "265414" | "268177" | "269186" | "269225" | "272854" | "275062" | "317632" | "320945" | "337911" | "338882" | "356581" | "369199" | "369273" | "369866" | "369944"
0 Response to Keep if/or across many disparate observations
Post a Comment