Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: RE: Generating dummies


From   "Eric G. Wruck" <[email protected]>
To   [email protected]
Subject   RE: st: RE: Generating dummies
Date   Tue, 21 Jun 2005 16:05:40 -0400

Well, I only count 50 states plus the District of Columbia.  You can't go by the number you have next to the state.  Numbers 3, 7, & 15, for example, are all missing.  To see how many unique states you have, you could do something like:

sort state

by state: keep if _n == 1

tab state



>ALABAMA 	1
>ALASKA 	2
>ARIZONA 	4
>ARKANSAS 	5
>CALIFORNIA 	6
>COLORADO 	8
>CONNECTICUT 	9
>DELAWARE 	10
>DISTRICT OF COLUMBIA 	11
>FLORIDA 	12
>GEORGIA 	13
>HAWAII 	14
>IDAHO 	16
>ILLINOIS 	17
>INDIANA 	18
>IOWA 	19
>KANSAS 	20
>KENTUCKY 	21
>LOUISIANA 	22
>MAINE 	23
>MARYLAND 	24
>MASSACHUSETTS 	25
>MICHIGAN 	26
>MINNESOTA 	27
>MISSISSIPPI 	28
>MISSOURI 	29
>MONTANA 	30
>NEBRASKA 	31
>NEVADA 	32
>NEW HAMPSHIRE 	33
>NEW JERSEY 	34
>NEW MEXICO 	35
>NEW YORK 	36
>NORTH CAROLINA 	37
>NORTH DAKOTA 	38
>OHIO 	39
>OKLAHOMA 	40
>OREGON 	41
>PENNSYLVANIA 	42
>RHODE ISLAND 	44
>SOUTH CAROLINA 	45
>SOUTH DAKOTA 	46
>TENNESSEE 	47
>TEXAS 	48
>UTAH 	49
>VERMONT 	50
>VIRGINIA 	51
>WASHINGTON 	53
>WEST VIRGINIA 	54
>WISCONSIN 	55
>WYOMING 	56
>



-- 

===================================================

       Eric G. Wruck
       Econalytics
       2535 Sherwood Road
       Columbus, OH  43209

       ph:      614.231.5034
       cell:    614.330.8846
       eFax:    614.573.6639
       eMail:   [email protected]
       website: http://www.econalytics.com

====================================================
*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index