Hi, Based on a subset of data pasted below:

Code:
* Example generated by -dataex-. To install: ssc install dataex
clear
input double year str2 state double growth str2(neigh1 neigh2 neigh3) str3 neigh4
1989 "WY"  9.05 "MT" "SD" "NE" "CO" 
1989 "IN"  4.62 "MI" "OH" "KY" "IL" 
1989 "CO"  3.01 "WY" "NE" "KS" "OK" 
1989 "MN"  2.57 "WI" "IA" "SD" "ND" 
1989 "ID"  5.31 "MT" "WY" "UT" "NV" 
1989 "NH"  3.41 "ME" "MA" "VT" ""   
1989 "DE"  2.87 "PA" "NJ" "MD" ""   
1989 "KS"  1.91 "NE" "MO" "OK" "CO" 
1989 "MI"  3.81 "OH" "IN" "WI" ""   
1989 "NV"  3.55 "ID" "UT" "AZ" "CA" 
1989 "RI"  6.21 "MA" "CT" ""   ""   
1989 "WV"  9.03 "PA" "MD" "VA" "KY" 
1989 "ND" -7.22 "MN" "SD" "MT" ""   
1989 "HI"  5.65 ""   ""   ""   ""   
1989 "NC"  4.54 "VA" "SC" "GA" "TN" 
1989 "IL"  5.65 "WI" "IN" "KY" "MO" 
1989 "AZ"  1.87 "UT" "CO" "NM" "CA" 
1989 "IA"  5.15 "MN" "WI" "IL" "MO" 
1989 "OH"  3.45 "PA" "WV" "KY" "IN" 
1989 "TX"   5.7 "OK" "AR" "LA" "NM" 
1989 "VA"  3.38 "MD" "NC" "TN" "KY" 
1989 "UT"   4.6 "ID" "WY" "CO" "NM" 
1989 "MD"  4.79 "PA" "DE" "VA" "WV" 
1989 "AL"  4.67 "TN" "GA" "FL" "MS" 
1989 "NM"  1.17 "CO" "OK" "TX" "AZ" 
1989 "AR"  3.82 "MO" "TN" "MS" "LA "
1989 "KY"  6.79 "OH" "WV" "VA" "TN" 
1989 "FL"  3.54 "GA" "AL" ""   ""   
1989 "LA"  5.04 "AR" "MS" "TX" ""   
1989 "TN"  3.83 "KY" "VA" "NC" "GA" 
1989 "CA"  3.11 "OR" "NV" "AZ" ""   
1989 "MO"  3.89 "IA" "IL" "KY" "TN" 
1989 "PA"  4.55 "NY" "NJ" "DE" "MD" 
1989 "WI"  5.14 "MI" "IL" "IA" "MN" 
1989 "VT"  6.79 "NH" "MA" "NY" ""   
1989 "ME"  5.82 "NH" ""   ""   ""   
1989 "GA"  2.68 "NC" "SC" "FL" "AL" 
1989 "OK"  6.23 "KS" "MO" "AR" "TX" 
1989 "OR"  4.72 "WA" "ID" "NV" "CA" 
1989 "NE"  5.35 "SD" "IA" "MO" "KS" 
1989 "SC"  4.19 "NC" "GA" ""   ""   
1989 "WA"  3.58 "ID" "OR" ""   ""   
1989 "MA"  5.14 "NH" "RI" "CT" "NY" 
1989 "NJ"  6.79 "NY" "CT" "DE" "PA" 
1989 "MS"  2.69 "TN" "AL" "LA" "AR" 
1989 "AK" -6.16 ""   ""   ""   ""   
1989 "CT"  5.29 "MA" "RI" "NY" ""   
1989 "SD"    .5 "ND" "MN" "IA" "NE" 
1989 "NY"  5.34 "VT" "MA" "CT" "NJ" 
1989 "MT"  -.27 "ND" "SD" "WY" "ID" 
1990 "MS"  1.18 "TN" "AL" "LA" "AR" 
1990 "IA"  3.54 "MN" "WI" "IL" "MO" 
1990 "AL"  -.28 "TN" "GA" "FL" "MS" 
1990 "WY"  1.23 "MT" "SD" "NE" "CO" 
1990 "IL"  1.76 "WI" "IN" "KY" "MO" 
1990 "CT"   .96 "MA" "RI" "NY" ""   
1990 "NV"  1.74 "ID" "UT" "AZ" "CA" 
1990 "FL"   .92 "GA" "AL" ""   ""   
1990 "WA"  2.74 "ID" "OR" ""   ""   
1990 "ME"   .62 "NH" ""   ""   ""   
1990 "MN"  2.01 "WI" "IA" "SD" "ND" 
1990 "CO"   .77 "WY" "NE" "KS" "OK" 
1990 "ID"  5.46 "MT" "WY" "UT" "NV" 
1990 "UT"   .23 "ID" "WY" "CO" "NM" 
1990 "AR"  1.82 "MO" "TN" "MS" "LA "
1990 "IN"  3.02 "MI" "OH" "KY" "IL" 
1990 "NJ"  1.23 "NY" "CT" "DE" "PA" 
1990 "LA"   .82 "AR" "MS" "TX" ""   
1990 "WI"  1.31 "MI" "IL" "IA" "MN" 
1990 "PA"  1.47 "NY" "NJ" "DE" "MD" 
1990 "ND"  7.37 "MN" "SD" "MT" ""   
1990 "AZ" -1.54 "UT" "CO" "NM" "CA" 
1990 "MO"   1.8 "IA" "IL" "KY" "TN" 
1990 "MA"  -.08 "NH" "RI" "CT" "NY" 
1990 "AK"  3.12 ""   ""   ""   ""   
1990 "GA"   .52 "NC" "SC" "FL" "AL" 
1990 "WV"  1.15 "PA" "MD" "VA" "KY" 
1990 "OR"  1.03 "WA" "ID" "NV" "CA" 
1990 "NC"  1.96 "VA" "SC" "GA" "TN" 
1990 "NM"  1.24 "CO" "OK" "TX" "AZ" 
1990 "NE"  2.77 "SD" "IA" "MO" "KS" 
1990 "MT"  4.16 "ND" "SD" "WY" "ID" 
1990 "NY"  -.41 "VT" "MA" "CT" "NJ" 
1990 "MD"   .65 "PA" "DE" "VA" "WV" 
1990 "VT"  3.07 "NH" "MA" "NY" ""   
1990 "SC"  1.95 "NC" "GA" ""   ""   
1990 "OK"    .8 "KS" "MO" "AR" "TX" 
1990 "DE"  5.52 "PA" "NJ" "MD" ""   
1990 "KS"   .31 "NE" "MO" "OK" "CO" 
1990 "OH"  1.84 "PA" "WV" "KY" "IN" 
1990 "MI"   1.2 "OH" "IN" "WI" ""   
1990 "RI"  2.25 "MA" "CT" ""   ""   
1990 "TX"   1.7 "OK" "AR" "LA" "NM" 
1990 "NH" -2.13 "ME" "MA" "VT" ""   
1990 "KY"  2.28 "OH" "WV" "VA" "TN" 
1990 "TN"   .33 "KY" "VA" "NC" "GA" 
1990 "HI"  4.51 ""   ""   ""   ""   
1990 "SD"  1.87 "ND" "MN" "IA" "NE" 
1990 "VA"  2.06 "MD" "NC" "TN" "KY" 
1990 "CA"   1.1 "OR" "NV" "AZ" ""   
end

For every state (by year) I would like to take the difference between the growth of that state and its neighboring states (for which the neighbors data exist) denoted by columns: neigh1 neigh2 neigh3 neigh4. E.g. for year 1989 for state WY, I would like to take the difference between the growth of WY and its neighbors MT, SD, NE, CO.

Would appreciate help in this regards. Thanks.