labelstates


/* to use the command just type
labelstates variable
*/

capture program drop labelstates 
program define labelstates 

 args statevariable
 capture label drop fips

# delimit ;
 
 label define fips
 0 "United States"
 1 "Alabama"
 2 "Alaska"
 4 "Arizona"
 5 "Arkansas"
 6 "California"
 8 "Colorado"
 9 "Connecticut"
 10 "Delaware"
 11 "District of Columbia"
 12 "Florida"
 13 "Georgia"
 15 "Hawaii"
 16 "Idaho"
 17 "Illinois"
 18 "Indiana"
 19 "Iowa"
 20 "Kansas"
 21 "Kentucky"
 22 "Louisiana"
 23 "Maine"
 24 "Maryland"
 25 "Massachusetts"
 26 "Michigan"
 27 "Minnesota"
 28 "Mississippi"
 29 "Missouri"
 30 "Montana"
 31 "Nebraska"
 32 "Nevada"
 33 "New Hampshire"
 34 "New Jersey"
 35 "New Mexico"
 36 "New York"
 37 "North Carolina"
 38 "North Dakota"
 39 "Ohio"
 40 "Oklahoma"
 41 "Oregon"
 42 "Pennsylvania"
 44 "Rhode Island"
 45 "South Carolina"
 46 "South Dakota"
 47 "Tennessee"
 48 "Texas"
 49 "Utah"
 50 "Vermont"
 51 "Virginia"
 53 "Washington"
 54 "West Virginia"
 55 "Wisconsin"
 56 "Wyoming"
 72 "Puerto Rico"
 52 "Virgin Islands";

 # delimit cr
 
 label values `statevariable' fips
 
 end
 
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s