Hello everyone,

Having some difficulties reshaping a data set. I have the following sample data set.


Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input float(rating_graf1 rating_graf2 rating_hous1 rating_hous2 rating_country1 rating_country2 rating_still1 rating_still2) str8(name1 name2 name3 name4 name5 name6 name7 name8)
4.63 4.52 4.53 4.69 4.62 4.28 4.53  4.5 "Anne"     "Jamal"    "Brett"    "Meredith" "Tamika"   "Todd"     "Tyrone" "Latoya"
   4 2.64 3.37 3.51  3.5 3.66 4.06 2.68 "Jamal"    "Tamika"   "Meredith" "Brett"    "Tyrone"   "Latoya"   "Todd"   "Anne"  
2.09 1.82 3.04 3.99 3.04 4.11 3.93 3.93 "Latoya"   "Jamal"    "Todd"     "Anne"     "Meredith" "Tyrone"   "Brett"  "Tamika"
1.61 3.75 3.45 4.41 2.51 2.48    5 4.44 "Brett"    "Latoya"   "Todd"     "Tamika"   "Anne"     "Meredith" "Jamal"  "Tyrone"
2.65  3.1 3.64 4.11 4.07 3.02 1.96 3.51 "Meredith" "Tamika"   "Tyrone"   "Todd"     "Latoya"   "Brett"    "Anne"   "Jamal"
3.61 3.56 3.93  3.3  3.7 3.24 4.08 3.39 "Todd"     "Brett"    "Anne"     "Jamal"    "Meredith" "Tyrone"   "Tamika" "Latoya"
3.04  3.7 2.05 1.99 1.81 3.56 2.17 2.18 "Meredith" "Tamika"   "Todd"     "Anne"     "Tyrone"   "Jamal"    "Latoya" "Brett"
1.26  1.5  1.9  2.1 2.76  2.3 2.41    3 "Todd"     "Latoya"   "Meredith" "Brett"    "Jamal"    "Tyrone"   "Anne"   "Tamika"
   1    1 3.04    1    1 2.02    1 2.01 "Tyrone"   "Jamal"    "Anne"     "Todd"     "Meredith" "Brett"    "Tamika" "Latoya"
3.15 1.52  4.5 3.45 1.95 2.28 4.55    5 "Anne"     "Meredith" "Latoya"   "Brett"    "Tyrone"   "Tamika"   "Todd"   "Jamal"
end
As you can see above the data set is currently in wide format. What I am struggling with is, each name (string variable) needs to be assigned to each of the rating (float variables) in order in which they are listed. The float variables are my dependents and the strings are my independents. I need my first nest (subobservation) to be type of rating, hence, graf, hous, country, and still. I then need to have second nest (subsubobservation) for each rating of a particular type e.g. rating_graf 1 is obs 1 and rating_graf2 is obs 2. To summarize, two observations per typ, 4 types, and a name with each observation for each respondent.

What is a clean way of reshaping this? Tried a few different ways, but I think my failure comes down to failing to rename variables appropriately before defining the reshape environment.

Any help would be great! Thanks in advance.