Hi fellow experienced researchers and STATA users,
I am trying to find the summation of a variable data (MA score) over t + 1 through t + 3 of an event (CEO turnover measured through a dummy variable, 1 for an actual turnover event) and t - 3 through t -1 (prior to the turnover event) over a large dataset. Later, I will need to find the difference between these pre and post event summations. Sample data example is given below:
input double year long gvkey double MA_SCORE_2018_w float turnover
1995 1004 -.0793594 1
1996 1004 -.0692754 0
1997 1004 .0072931 0
1998 1004 -.0387679 0
1999 1004 -.0730754 0
2000 1004 -.0696314 0
2001 1004 -.020128 0
2002 1004 -.0847194 0
2003 1004 -.0698555 0
2004 1004 -.0677616 0
2005 1004 -.0726101 0
2006 1004 -.0773012 0
2007 1004 -.0549248 0
2008 1004 -.089513 0
2009 1004 -.0799284 0
2010 1004 -.0529496 0
2011 1004 -.0370836 0
2012 1004 -.1311681 0
2013 1004 -.1212202 0
2014 1004 -.1385657 0
2015 1004 -.1532222 0
2016 1004 -.0984766 0
2017 1004 -.0913004 1
2000 1013 .084332 1
2001 1013 -.0619783 0
2002 1013 -.1163758 0
2003 1013 -.0692972 1
2004 1013 -.095181 0
2005 1013 -.0834125 0
2006 1013 -.1054572 0
2007 1013 -.0461751 0
2008 1013 -.0750284 0
2009 1013 -.076883 0
2010 1013 -.0043238 1
1993 1034 -.0377137 1
1994 1034 -.0202996 0
1995 1034 -.1025984 0
1996 1034 -.1042087 0
1997 1034 -.1417544 0
1998 1034 -.0760982 1
end
[/CODE]
The summation will be for the MA_score variable depending on the turnover dummy occurence. Looking forward to your assistance. Thanks in advance.
Related Posts with Summation of data before and after an event (dummy variable)
Copy variables (basic problems)Hi, I would love some help! I try to copy the personal tax in 2002 to all years. My initial data l…
Interpreting z-value output from ivregress 2sls and query about bar chartsHi all, This is my first post but i'll try to make my questions as clear as possible. To be clear t…
Panel data regression weird ORDear statalist community, Thank you all in advance for taking the time to read this post and help m…
Fixed Effect variablesHello Statalist I want to perform a logit regression using various variables (not fixed effects) bu…
VSELECT command not workingHello! I am trying to use the following Vselect command and am getting the following error message. …
Subscribe to:
Post Comments (Atom)
0 Response to Summation of data before and after an event (dummy variable)
Post a Comment