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
Regresion output code helpI need the regression output by three columns Full Sample , Rural and Urban for each dependent varia…
EGARCH modelling expressionsHi everyone,
I was wondering if anyone would be able to help me with an issue I have come across on…
Plot Country Specific EffectsHi
I work with the pwt10.0 dataset and running the following fixed effects regression:
Code:
xtreg …
How to match same state codes based on ID variable in Panel data?Hi,
I have an unbalanced panel running for the years 2010 and 2014 to 2019. The state id variable o…
how to download several excel sheet each one represents a yearhello, am new to Stata thank you for your help in advance. I have the data (around 27 variables) for…
Subscribe to:
Post Comments (Atom)
0 Response to Dropping Observations by using if command
Post a Comment