Creating grouping variable

Moderators: statman, Analyst Techy, andris, Fierce, GerineL, Smash

student74
Posts: 9
Joined: Thu Jul 09, 2015 7:01 am

Creating grouping variable

Postby student74 » Mon Oct 05, 2015 1:49 am

Hi All,

I have an issue I can't think through and was hoping for some assistance.

I have a data set wherein I need to create a new variable that contains the Local Government Area (LGA) that clients are residing in. To do this, I am using the postcodes they have provided. So I have written the syntax to recode the postcodes into their respective LGAs (i.e. RECODE Postcode (3690 3691 3692 = 1) and so on up to 12 LGAs), but, there is missing data and postcodes outside of the LGAs I have created. I would like to differentiate between actual missing data (the data set just has the period to represent missing data) and postcodes outside of the LGAs of interest. Is there some more syntax that I can add that will perhaps add 13 "Missing" and 14 "Other"?

I hope that makes some sense.
Thanks for your help.
JonPedersen
Posts: 117
Joined: Wed May 25, 2011 7:07 am
Contact:

Re: Creating grouping variable

Postby JonPedersen » Mon Oct 05, 2015 9:22 am

Hi,
You may add

Code: Select all

... (SYSMIS=13) (ELSE=14)
to your recode statement, I would think. Note that order is important.
hth
Jon
student74
Posts: 9
Joined: Thu Jul 09, 2015 7:01 am

Re: Creating grouping variable

Postby student74 » Tue Oct 06, 2015 1:25 am

That's perfect. Thank you! :D

Who is online

Users browsing this forum: No registered users and 1 guest

cron