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 (April 2007, week 5)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 30 Apr 2007 12:50:46 -0400
Reply-To:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Mike Rhoads <RHOADSM1@WESTAT.COM>
Subject:   Re: ODS vs. Macro for a complex printout request
Comments:   To: peterflomconsulting@MINDSPRING.COM
In-Reply-To:   <BAY123-F16EBEED82DA1FB5D40FF5DDE4C0@phx.gbl>
Content-Type:   text/plain; charset="iso-8859-1"

And, if you can't get all the necessary output from one PROC, you could elaborate on Toby's advice by running as many procs as necessary to produce output data sets, use DATA steps and/or SQL to put everything together the way you need it, and then use PROC PRINT or PROC REPORT for the final output.

Mike Rhoads Westat RhoadsM1@Westat.com

-----Original Message----- From: owner-sas-l@listserv.uga.edu [mailto:owner-sas-l@listserv.uga.edu] On Behalf Of toby dunn Sent: Monday, April 30, 2007 11:20 AM To: gerhard.hellriegel@T-ONLINE.DE; SAS-L@LISTSERV.UGA.EDU Cc: peterflomconsulting@MINDSPRING.COM Subject: Re: ODS vs. Macro for a complex printout request

Peter ,

What you want to do is find a proc that produces all the relevant stats you need. Then you will need to use ODS output tables. If you need to find which table you need to use run the proc as you normally would except do the following wrapper:

ODS Trace On ;

Proc Code Here

ODS Trace Off ;

Now look at your log. Find the right table(s).

Then do:

ODS Listing Close ;

ODS Output <ODS Table Name Here> = <SAS Data Set Name Here> ;

Proc Code Here

ODS Listing ;

Now Sort your data set, then drop into a data step and cull out the unwanted obs. Then simply print them out in any format you want by either using teh default listing or using ODS to push the report out in the desired format.

Toby Dunn

You can see a lot by just looking. ~Yogi Berra

Do not seek to follow in the footsteps of the wise. Seek what they sought. ~Matsuo Basho

You never know what is enough, until you know what is more than enough. ~William Blake, Proverbs of Hell

From: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE> Reply-To: Gerhard Hellriegel <gerhard.hellriegel@T-ONLINE.DE> To: SAS-L@LISTSERV.UGA.EDU Subject: Re: ODS vs. Macro for a complex printout request Date: Mon, 30 Apr 2007 11:00:03 -0400

ODS would not really help you for that. With ODS you can get output to a certain format (RTF, PDF, HTML, ...) instead of sending it to the SAS output window. If you are successful in producing that output in SAS, it's no problem to get it in ODS. But the first thing is to get it.

If I understand that right, PROC SUMMARY might a idea.

proc summary data=sashelp.class nway; class sex; var _numeric_; output out=x mean=; run;

produces averages für the two sex-groups. With that you don't have much control. E.g. if your grouping variable is numeric, that won't work like above. Maybe the macro isn't that bad and you should show us the error messages? Perhaps with a few changes it will run? Otherwise you should tell more details what you want to see. Gerhard

On Mon, 30 Apr 2007 10:42:19 -0400, Peter Flom <peterflomconsulting@MINDSPRING.COM> wrote:

>Hello again > >I have a data set with about 900 variables. One variable will be used as a 'grouping' variable. > >My boss would like (as part of data exploration, not for final work, a table with the following information. > >1. Variable name >2. Means for each variable for each of two groups >3. STD for each variable for each of two groups >4. Coefficient of variation for each variable for each of two groups >5. F test from an ANOVA or t-test comparing the variables >6. p value from the F or t-test > > >(for a total of nine columns and a lot of rows) > >She wants this sorted by p-value, and only for cases where the p-value is under .05 > > >My predecessor here, who was prone to complex programs, wrote a long macro (with no comments) which I do not understand. It worked for him, it doesn't work for me, I don't know why. > >I was thinking that this should be RELATIVELY easy in ODS..... >to be fair, my predecessor wrote the macro before ODS existed. > >Any guidance would be appreciated. > >Again, as a frequent critic of automatic selection methods, I know this isn't a good idea for an ANALYSIS plan, and we aren't using it as such. > > >Thanks! > >Peter

_________________________________________________________________ MSN is giving away a trip to Vegas to see Elton John. Enter to win today. http://msnconcertcontest.com?icid-nceltontagline


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