LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous (more recent) messageNext (less recent) messagePrevious (more recent) in topicNext (less recent) in topicPrevious (more recent) by same authorNext (less recent) by same authorPrevious page (November 2006, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Thu, 30 Nov 2006 15:12:50 -0800
Reply-To:     rss <rslotpole@FMR.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         rss <rslotpole@FMR.COM>
Organization: http://groups.google.com
Subject:      Re: basic syntex for Proc Tabulate
Comments: To: sas-l@uga.edu
In-Reply-To:  <445d9dbe0611301259w70ee11acq32e3361c93066a96@mail.gmail.com>
Content-Type: text/plain; charset="us-ascii"

Yu,

Here's a portion of my data set: Dataset name a33

yy mm N CORR 1997 11/1/1997 2 1 1997 12/1/1997 3 -0.5 1998 1/1/1998 3 -0.5 1998 2/1/1998 15 0.25483871 1998 3/1/1998 20 0.477099237 1998 4/1/1998 33 0.336905966 1998 5/1/1998 41 0.601691042 1998 6/1/1998 31 0.36128692 1998 7/1/1998 33 0.390909091 1998 8/1/1998 27 -0.071959755 1998 9/1/1998 24 -0.286901271 1998 10/1/1998 24 0.292759706 1998 11/1/1998 67 0.55485575 1998 12/1/1998 79 0.10101476 1999 1/1/1999 91 0.103458364 1999 2/1/1999 127 0.125940977 1999 3/1/1999 153 0.051398853 1999 4/1/1999 219 0.142683906 1999 5/1/1999 267 0.028117021 1999 6/1/1999 288 0.080195742 1999 7/1/1999 311 0.120760693 1999 8/1/1999 331 0.152256117 1999 9/1/1999 342 0.114990615 1999 10/1/1999 366 0.137903518 1999 11/1/1999 397 0.141527962 1999 12/1/1999 407 0.203815996 2000 1/1/2000 406 0.140783109 2000 2/1/2000 402 0.119713309 2000 3/1/2000 441 0.186155764 2000 4/1/2000 460 0.130206348 2000 5/1/2000 506 0.10201116 2000 6/1/2000 555 0.1818349 2000 7/1/2000 590 0.179158797 2000 8/1/2000 607 0.184940269

Now, here is some code that almost does everything I need:

proc tabulate data = a33 noseps order=data; class yy mm; var corr ;

table yy=''all='AVG',(mm='information Coefficients' all='AVG')*corr=''*mean='' *format=5.3/rts= 8 box='YEAR'; run;

Here are the three problems I'm still having:

1) My data starts out in Nov 1997. The table prints out but the months start in Nov instead of Jan. I tried to run the following:

data a34; set a33; do yy=1997 to 2006 by 1; do mm = 1 to 12 by 1; abc = ranuni(1234); output; end; end; run;

but that create a file of 13080 records instead of the 120. mm is a numeric. Even if this worked how would i relabel the variables 1 through 12. anyway, all sorts of problems trying to get this to come up Jan through Dec.

2) the print out very nicely places a column line for the last column. Is there a way to suppress the lines for rows (using noseps) but have 1 line just above the last row so we can offset and Highlight the row of averages. Also, could we change the font or color for observations for some cells and not others? How would we reference a particular number? would we use yy and mm?

3) The title "YEAR" in the top left hand corner. Is there a way to print this in the middle of the box (in terms of vertical)?

Nailing those three items would just about wrap this up. Thanks a lot for everyone for their help. Slowly but surly we are making progress.


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