BookmarkSubscribeRSS Feed
Manojahuja1418
Calcite | Level 5
How to categorize the data into two group in sad? For example if we have dataset for airline so how we categorize the data into two group; one group for jet Airways and air india and second group for all other airlines?

Please help
5 REPLIES 5
Shmuel
Garnet | Level 18

You already categorized your data into two groups:

  one group for jet Airways and air india and second group for all other airlines

 

It is not clear what do you want.

If you can identify the group inside your data,

then you can add a flag or a category variable with appropriate value,

like 1 or 0, "Jet" or " ", etc.

Manojahuja1418
Calcite | Level 5
Thanks for replying so quickly

But do you please help me with coding also, as I have a data and in the
given data set I need to categorize the data into two group group 1 for jet
airways and air india only and group 2 for all other airlines,
Thanks
Shmuel
Garnet | Level 18

Can you supply a test data with both categories data, and define the rules how

to distinguish between the groups - what variables to check for what values ?

Manojahuja1418
Calcite | Level 5
Let's suppose we have a large data containing airline information like
airline name, depart time, arrival time and now from airline name we have
to categorize data into two group like jet Airways and air india
information in group A and other airline information in group B

Hope now it's understandable

Thanks,
Manoj Ahuja
Shmuel
Garnet | Level 18

You asked for a code, but you did not gave any example of input (few lines) nor of the rules of

how to decide to which category should be.

 

Your note is  "from airline name we have to categorize data" -

can you supply airline names and define their categories?

 

 

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 716 views
  • 0 likes
  • 2 in conversation