Hi,
I have to compute standard deviation of next five years earnings (roa in data) of each firm. For example Firm A's standard deviation of ROA in year t will be for year t+1 to t+5. Following is the data sample.
Thank you.
I have to compute standard deviation of next five years earnings (roa in data) of each firm. For example Firm A's standard deviation of ROA in year t will be for year t+1 to t+5. Following is the data sample.
Code:
* Example generated by -dataex-. To install: ssc install dataex clear input int(firmid year) float roa 10006 1975 .044461 10006 1976 .0468497 10006 1977 .0455249 10006 1978 .0445072 10006 1979 .0470507 10006 1980 .0403393 10006 1981 .0383093 10006 1982 .0275599 10006 1983 .0005601 10007 1989 .2495441 10010 1986 .0703543 10010 1987 .0953522 10010 1988 .1139882 10010 1989 .1082189 10010 1990 .0898358 10010 1991 .079795 10010 1992 -.0218884 10010 1993 -.1065698 10010 1994 .0344516 10012 1987 .2495441 10012 1988 .2142017 10012 1989 -.029544 10012 1990 .0114192 10012 1991 -.1401488 10012 1992 -.0454312 end
Comment