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 (September 2006, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 7 Sep 2006 12:20:18 -0400
Reply-To:     Xu Libin <Libin.Xu@IRS.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Xu Libin <Libin.Xu@IRS.GOV>
Subject:      Re: One dimentional table for a dozen variables
Comments: To: Nathaniel_Wooding@Dom.com, toby dunn <tobydunn@hotmail.com>
In-Reply-To:  <OF00EF8D8E.7CAB0D04-ON852571E2.004CBBF5-852571E2.004CCCF6@dom.com>
Content-Type: text/plain; charset="US-ASCII"

Thanks to the prompt assistance of Nathanial and Toby, the table was generated as desired although the process was not as simple as I thought, such as one data step and one proc freq. No matter what approach we take, proc transpose cannot be avoided.

Basically I used Nationiel's program. It took me three steps to produce the table: Proc transpose by id, proc sort by _name_ and col1, and proc freq (_name_ * col1).

Toby's program is more complex. I was not aware of the method of using ods to obtain the summary data. It takes two proc transpose to get the needed table. There must be an advantage for this approach that I did not realize now.

I'll keep both programs for later reference. Thanks a lot!

Libin

Hi, All!

I have a dozen variables which all have the value of 1, 2, 3, or 4. I want to produce a table as below:

Count Variable Name 1 2 3 4 Var1 12 23 35 10 Var2 9 25 40 6

In SPSS, you can create a banner-type variable x and group the variables together to create a table like this. I can't figure out a way to do this in SAS. Proc freq gives a 12 separate tables and proc tabulate only gives you total count, sum of the scores or mean of the scores. Can you propose a simple way for this type of table? Thanks.

Libin

----------------------------------------- CONFIDENTIALITY NOTICE: This electronic message contains information which may be legally confidential and/or privileged and does not in any case represent a firm ENERGY COMMODITY bid or offer relating thereto which binds the sender without an additional express written confirmation to that effect. The information is intended solely for the individual or entity named above and access by anyone else is unauthorized. If you are not the intended recipient, any disclosure, copying, distribution, or use of the contents of this information is prohibited and may be unlawful. If you have received this electronic transmission in error, please reply immediately to the sender that you have received the message in error, and delete it. Thank you.


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