Hi,
I'm using some data from spreadsheets where the data is in the following layout:
I've imported this into stata and want to arrange the data in the following layout:
The original data doesn't have column indicating variable name-rate ( it's only available in the file description).
Would appreciate any help.
Thanks!
I'm using some data from spreadsheets where the data is in the following layout:
| State | 2005 | 2006 | 2007 |
| A | 12 | 13 | 14 |
| B | 15 | 16 | 17 |
| C | 20 | 19 | 18 |
Code:
* Example generated by -dataex-. For more info, type help dataex clear input str5 var1 str4(var2 var3) "State" "Year" "Rate" "A" "2005" "12" "A" "2006" "13" "A" "2007" "14" "B" "2005" "15" "B" "2006" "16" "B" "2007" "17" "C" "2005" "20" "C" "2006" "19" "C" "2007" "18" end
Would appreciate any help.
Thanks!

Comment