Date: Thu, 24 Jan 2008 09:38:35 -0600
Reply-To: "data _null_," <datanull@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: "data _null_," <datanull@GMAIL.COM>
Subject: Re: Best way to code states
In-Reply-To: <978ccd3e-d78a-40ee-b006-e67ec8ca4644@u10g2000prn.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1
On Jan 24, 2008 9:28 AM, Melodyp <pearsonmelody@gmail.com> wrote:
> What I want is, how can I code State from the current GA , FL,
> CA..etc to some numbers like 00 for GA, 01 for FL, 11 for CA, etc...
stFips = stfips(state);
But I don't see why you need to do this. Codes are codes. The two
character postal code just a good as the FIPS. Better, perhaps
because most folks know what they are.
> My problem is I have at least 45 states, is there any way, I can use
> some number like 0, or 1 to code? or there is a more efficient way?
Are you asking how to code the states into dummy indicator variables?
> Thank you,
> Melody
>
|