Dear All
*I have sent this message to someone's inbox before i red the posting rules, so I am correcting a mistake I made.
I am a new to Stata, I am struggling to calculate industry sales growth. I know how to calculate each firm sales growth using, " generate laggedsales =sales[_n-1] if Code==Code[_n-1] ". then Sales-Lagged sales.
I have tried to read some previous posts on calculating industry sales growth, posted here but i failed to understand.
Below is a data extract from a 10 year unbalanced data which has 9809 observations i intend to use.
Kindly assist
firm year sales industrycode
000892 2012 796438.2 I63
000892 2011 2062352 I63
000892 2015 4427383 I63
900957 2013 6379161 K70
000409 2011 8076227 C35
900957 2012 9840413 K70
000613 2017 1.03e+07 H61
000035 2013 1.50e+07 C39
000409 2008 1.53e+07 C35
300235 2011 1.56e+07 I65
002148 2009 1.87e+07 I63
002148 2008 1.94e+07 I63
300085 2010 2.10e+07 I65
300235 2012 2.13e+07 I65
300288 2012 2.25e+07 I63
300282 2011 2.37e+07 C39
002148 2010 2.40e+07 I63
002148 2011 2.56e+07 I63
300017 2009 2.60e+07 I63
600763 2008 2.69e+07 Q83
300075 2010 2.73e+07 I65
300085 2012 2.74e+07 I65
300235 2013 2.74e+07 I65
300085 2011 2.76e+07 I65
300113 2010 2.88e+07 I64
002502 2010 2.88e+07 C24
300023 2010 2.91e+07 C35
600763 2009 2.92e+07 Q83
300282 2012 2.94e+07 C39
000613 2014 2.97e+07 H61
300085 2013 2.97e+07 I65
600083 2008 2.99e+07 C39
300348 2012 3.05e+07 I65
300074 2010 3.05e+07 I63
300084 2010 3.13e+07 B11
000613 2012 3.17e+07 H61
002502 2011 3.18e+07 C24
000613 2010 3.21e+07 H61
300399 2014 3.25e+07 I65
002558 2011 3.28e+07 L72
300348 2013 3.33e+07 I65
300071 2010 3.36e+07 I65
300075 2011 3.41e+07 I65
002558 2012 3.49e+07 N78
000536 2009 3.50e+07 C38
300235 2014 3.51e+07 I65
002279 2009 3.60e+07 I65
300133 2010 3.70e+07 R86
300023 2009 3.73e+07 C35
300148 2010 3.75e+07 R85
*I have sent this message to someone's inbox before i red the posting rules, so I am correcting a mistake I made.
I am a new to Stata, I am struggling to calculate industry sales growth. I know how to calculate each firm sales growth using, " generate laggedsales =sales[_n-1] if Code==Code[_n-1] ". then Sales-Lagged sales.
I have tried to read some previous posts on calculating industry sales growth, posted here but i failed to understand.
Below is a data extract from a 10 year unbalanced data which has 9809 observations i intend to use.
Kindly assist
firm year sales industrycode
000892 2012 796438.2 I63
000892 2011 2062352 I63
000892 2015 4427383 I63
900957 2013 6379161 K70
000409 2011 8076227 C35
900957 2012 9840413 K70
000613 2017 1.03e+07 H61
000035 2013 1.50e+07 C39
000409 2008 1.53e+07 C35
300235 2011 1.56e+07 I65
002148 2009 1.87e+07 I63
002148 2008 1.94e+07 I63
300085 2010 2.10e+07 I65
300235 2012 2.13e+07 I65
300288 2012 2.25e+07 I63
300282 2011 2.37e+07 C39
002148 2010 2.40e+07 I63
002148 2011 2.56e+07 I63
300017 2009 2.60e+07 I63
600763 2008 2.69e+07 Q83
300075 2010 2.73e+07 I65
300085 2012 2.74e+07 I65
300235 2013 2.74e+07 I65
300085 2011 2.76e+07 I65
300113 2010 2.88e+07 I64
002502 2010 2.88e+07 C24
300023 2010 2.91e+07 C35
600763 2009 2.92e+07 Q83
300282 2012 2.94e+07 C39
000613 2014 2.97e+07 H61
300085 2013 2.97e+07 I65
600083 2008 2.99e+07 C39
300348 2012 3.05e+07 I65
300074 2010 3.05e+07 I63
300084 2010 3.13e+07 B11
000613 2012 3.17e+07 H61
002502 2011 3.18e+07 C24
000613 2010 3.21e+07 H61
300399 2014 3.25e+07 I65
002558 2011 3.28e+07 L72
300348 2013 3.33e+07 I65
300071 2010 3.36e+07 I65
300075 2011 3.41e+07 I65
002558 2012 3.49e+07 N78
000536 2009 3.50e+07 C38
300235 2014 3.51e+07 I65
002279 2009 3.60e+07 I65
300133 2010 3.70e+07 R86
300023 2009 3.73e+07 C35
300148 2010 3.75e+07 R85
Comment