I have the daily return datasets for various companies from 1996 to 2021 (example of dataset attached below)-
input long co_code str8 co_stkdate float(bse_firm_level_return_percentage nse_firm_level_return_percentage)
11 "20081006" 0 0
11 "20081007" -9 -11
11 "20081008" -13 -12
11 "20081010" -11 -12
11 "20081013" 7 6
11 "20081014" -10 -10
11 "20081015" 9 10
11 "20081016" 14 13
11 "20081017" -20 -20
11 "20081020" -1 -1
11 "20081021" -3 0
11 "20081022" -5 -6
11 "20081023" -7 -6
11 "20081024" -13 -14
11 "20081027" -8 -10
11 "20081028" 19 20
11 "20081029" -9 -5
11 "20081031" 3 4
11 "20081103" 1 0
11 "20081104" 8 5
11 "20081105" -2 0
11 "20081106" 0 -1
11 "20081107" 14 15
11 "20081110" -3 -4
I want to drop the observations of the companies with zero returns on at least 75% of the days in the last 12 months. Kindly help me in this regard.
Related Posts with Dropping Observations by using if command
scatterplot with text labels for y and x?Dear All, I'd like to have a figure like below (need not to be exactly the same). Array I make up …
regression panel data: OLS / GEEhello! I have a panel dataset on which I would like to perform a regression. my dependent variable …
Thesis regressionGoodmorning all, For my masters thesis I have to do some cross-sectional regressions, using the mod…
Export misstable to LatexHi, What options are available for exporting Stata's misstable to Latex? This was asked six years …
ARIMA Modelling with Binary Independent VariableI am trying to fit an ARIMA model to my intervention analysis but when I use the syntax and add both…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping Observations by using if command
Post a Comment