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)
Xtlogit vs Logit.Dear respected Members, I’m not professional in Stata. Sorry, Pls could anyone help and offer me an …
adding summary weight in metabolic scoreHi, I am trying to generate a metabolic syndrome score for the children aged 11 to 12 years using PC…
Out-of-Sample Prediction using Multinomial Logit ModelHi I have a question about the out-of-sample prediction using multinomial logit model. <Situatio…
Estimating FE model with -reg or -xtregDear, I am estimating a panel data fixed effects model (both year and industry). I am aware I can e…
2SLS on Panel DataHi guys! I'm using 2SLS on Panel Data, however when I calculate 2SLS manually, I mean, by doing: F…
Subscribe to:
Post Comments (Atom)
0 Response to Summation of data before and after an event (dummy variable)
Post a Comment