Hello everyone, I have dataset which has gvkey, year, and sale. I need to calculate standard deviation pf sale for each firm (identified by gvkey) between year of t to t-4. For example standard deviation of sale for 1996 from 1996 to 1995, 1994, 1993, 1992. I appreciate your help. gvkey year sale 1004 1992 524 1004 1993 765 1004 1994 442 1004 1995 510 1004 1996 324 …. …. … 1019 1990 2900 1019 1991 3600 1019 1992 5624 1019 1993 4527 1019 1994 6570 1019 1995 4298 1019 1996 4657 1019 1997 5498 1019 1998 6790 …. … …
... View more