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 (June 1999, week 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 18 Jun 1999 07:49:34 -0400
Reply-To:     "Brucken, Nancy" <Nancy.Brucken@WL.COM>
Sender:       "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU>
From:         "Brucken, Nancy" <Nancy.Brucken@WL.COM>
Subject:      Re: Query on Proc Tabulate
Comments: To: Lyndon Lacaya <donlacaya@HOTMAIL.COM>
Comments: cc: "SAS-L (E-mail)" <sas-l@listserv.uga.edu>
Content-Type: text/plain; charset="iso-8859-1"

Hi Don, Try making the following change to your code:

proc tabulate data=complain noseps format=8.; class group V0sweat V1SWEAT; *V1SWEAT added; table V0sweat ALL V1SWEAT all, group*n; ^^^^^ label v0sweat='Visit 1: sweating' V1SWEAT='Visit 2: sweating'; title 'Table 2'; run;

Adding the ALL keyword after V0SWEAT causes SAS to total up that variable before going on to V1SWEAT.

Hope this helps, Nancy

Nancy Brucken Parke-Davis, QIP (734) 622-5767 Internet address: Nancy.Brucken@wl.com

-----Original Message----- From: Lyndon Lacaya [mailto:donlacaya@HOTMAIL.COM] Sent: Thursday, June 17, 1999 6:30 PM To: SAS-L@UGA.CC.UGA.EDU Subject: Query on Proc Tabulate

Dear SAS-Lers:

I would like to ask for your insight regarding the PROC TABULATE procedure. When I issue the following statements

proc tabulate data=complain noseps format=8.; class group V0sweat; table V0sweat all, group*n; label v0sweat='Visit 1: sweating'; title 'Table 1'; run;

I get the following output.

Table 1 ------------------------------------------ Group ------------------- Drug A Drug B ------------------- N N ------------------------------------------ Visit 1: sweating Mild 12 14 Moderate 8 5 None 13 13 Severe 6 4 ALL 39 36 ------------------------------------------ (note:borders of the table were edited as some funny charaters apeared as I cut and paste the table from SAS to my email program)

So far so good. But when I modified the program to include another class variable V1SWEAT and for which one subject from Drug A has missing value on V1SWEAT, I observed that SAS automatically deletes this subject in the cross tabulation for the other class variable. The modified program is as follows:

proc tabulate data=complain noseps format=8.; class group V0sweat V1SWEAT; *V1SWEAT added; table V0sweat V1SWEAT all, group*n; label v0sweat='Visit 1: sweating' V1SWEAT='Visit 2: sweating'; title 'Table 2'; run;

with corresponding output:

Table 2

------------------------------------------ Group ------------------- Drug A Drug B ------------------- N N ------------------------------------------ Visit 1: sweating Mild 12 14 Moderate 8 5 None 13 13 Severe 5 4 Visit 2: sweating Mild 18 12 Moderate 2 6 None 16 13 Severe 2 5 ALL 38 36 ------------------------------------------

Note that in Table 2, the total number of observations for Drug A at Visit 1 is 38 and not 39 as shown in Table 1.

Questions: 1. How do I modify my program so that frequencies in the table would reflect the number of nonmissing values for each visit/variable (i.e. 39 subjects at visit 1 and 38 subjects at visit 2 for Drug A)?

2. My program above doesn't print the total number of observations at visit 1 in Table 2. What statement should I add so that a line between the Severe line and (Visit 2: sweating )line will give me the total?

Any assistance is greatly appreciated. Thank you very much in advance.

Don Lacaya Biostatistician Schering AG Philippines Email: Lyndon.Lacaya@schering.DE

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


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