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 (January 1998, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Tue, 27 Jan 1998 16:59:09 -0500
Reply-To:     rcoleman@worldnet.att.net
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         Ron Coleman <rcoleman@WORLDNET.ATT.NET>
Organization: Links Analytical, Inc.
Subject:      Re: proc tabulate and multiple response variables
Content-Type: text/plain; charset=us-ascii

Ralph Brands wrote:

> I recently asked a question about analysis of multiple response data > in SAS. > Having digested a lot of very helpful information from several > readers, > and tried to understand Proc Freq, I now understand some situations > (referred to in SPSS as multiple-dichotomy groups), but am still stuck > on > this type (which SPSS calls a multiple-response groups): > > Respondents are asked to list which of 5 states they have visited. The > > data are entered as follows: (each state can appear in ANY column) > > case state1 state2 state3 > 1 NY CAL . > 2 MASS . . > 3 CAL MASS . > 4 MI WA MASS > 5 WA . . > > We want to know what percentage of respondents reported visiting NY, > what > percentage reported visiting CAL etc, ie the desired output gives the > following information: > > NY 1 20% > CAL 2 40% > MASS 3 60% > MI 1 20% > WA 2 40% > > I have the feeling that this CAN be done in Proc Tabulate but haven't > got > it yet. Can someone provide a suggestion please? > > Ralph Brands

Ralph,

PROC TABULATE will handle multiple response variables but only one at a time. My suggestion is that you create a temporary dataset with only 1 multiple response (categorical) variable:

DATA TEMP / VIEW=TEMP; SET your.data; ARRAY ST(5) STATE1-STATE5 DO I = 1 TO DIM(ST); IF ST(I) NE ' ' THEN DO; STATE = ST(I); OUTPUT; END; END; RUN;

PROC TABULATE DATA=TEMP; CLASS STATE; TABLE STATE, PCTN; RUN;

-- Ron Coleman A SAS Quality Partner. Links Analytical, Inc. Linking your data to your business! 3545-1 St. Johns Bluff Rd. Suite 300 Jacksonville FL 32224 mailto:rcoleman@linksanalytical.com (904) 641-4766


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