LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (May 2009, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 13 May 2009 09:00:42 -0400
Reply-To:     "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Fehd, Ronald J. (CDC/CCHIS/NCPHI)" <rjf2@CDC.GOV>
Subject:      Re: Summarize Combinations of Activities?
In-Reply-To:  <0541be51-9142-4de8-8d62-d1340ba8a1e1@r36g2000vbr.googlegroups.com>
Content-Type: text/plain; charset=us-ascii

easy: proc freq data = Libref.MyData tables Act_Id * Color / list missing noprint out = Work.List_Colors;

Proc Transpose data = Work.List_Colors;

see also:

http://www.sascommunity.org/wiki/Processing_Check-All-That-Apply

Ron Fehd the module/routine/subroutine maven CDC Atlanta GA USA RJF2 at cdc dot gov

> -----Original Message----- > From: owner-sas-l@listserv.uga.edu > [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of > marzlet.sas@gmail.com > Sent: Tuesday, May 12, 2009 5:42 PM > To: sas-l@uga.edu > Subject: Summarize Combinations of Activities? > > I've simplified the data in this snapshot to show that the act_id > separates a new activity, from the next. Activity 10JN-123 contains 3 > colors, and currently only the 3 variables are act_id, sequence, and > color. > > I'm trying to determine a few things: > - I would like to create the 'new-var' so that i can list out the > frequency of al the various combinations the color combinations. > - Ultimately I want to determine the percentage of how often is there > a second color? (80%) > What percentage of the time is there a third color? (60%) > > act_id sequence color new_var > 10JN-123 1 red red yellow orange > 10JN-123 2 yellow red yellow orange > 10JN-123 3 orange red yellow orange > 10JN-234 1 red red yellow orange > 10JN-234 2 yellow red yellow orange > 10JN-234 3 orange red yellow orange > 10JN-345 1 yellow yellow red > 10JN-345 2 red yellow red > 10JN-456 1 yellow yellow orange red > 10JN-456 2 orange yellow orange red > 10JN-456 3 red yellow orange red > 10JN-567 1 blue blue red > 10JN-567 2 red blue red > 10JN-678 1 blue blue red orange > 10JN-678 2 red blue red orange > 10JN-678 3 orange blue red orange > 10JN-789 1 blue blue red yellow > 10JN-789 2 red blue red yellow > 10JN-789 3 yellow blue red yellow > 10JN-890 1 blue blue > 10JN-901 1 yellow yellow > 10JN-902 1 yellow yellow orange red > 10JN-902 2 orange yellow orange red > 10JN-902 3 red yellow orange red > > Any insight would be greatly appreciated - thanks in advance! > Megan > >


Back to: Top of message | Previous page | Main SAS-L page