Hi SAS master,
I have a dataset like below.
ID | Year | Var1 |
1 | 2001 | 3.5 |
1 | 2003 | 32.6 |
1 | 2005 | 0 |
1 | 2005 | 0 |
1 | 2005 | 5.6 |
1 | 2006 | 72.5 |
1 | 2010 | 0 |
1 | 2012 | 4.5 |
2 | 2004 | 0 |
2 | 2004 | 5 |
2 | 2007 | 42.31 |
2 | 2012 | 95.12 |
2 | 2012 | 86.4 |
2 | 2012 | 49.3 |
2 | 2015 | 0 |
2 | 2015 | 0 |
I would like to get the average for each firm in each year. The dataset I want is below.
ID | Year | Var1 |
1 | 2001 | 3.5 |
1 | 2003 | 32.6 |
1 | 2005 | 1.866667 |
1 | 2006 | 72.5 |
1 | 2010 | 0 |
1 | 2012 | 4.5 |
2 | 2004 | 2.5 |
2 | 2007 | 42.31 |
2 | 2012 | 76.94 |
2 | 2015 | 0 |
what program do I need to use? Thanks.