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 (June 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Wed, 3 Jun 2009 23:33:45 -0400
Reply-To:     Ya Huang <ya.huang@AMYLIN.COM>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Ya Huang <ya.huang@AMYLIN.COM>
Subject:      Re: output ret to file
Comments: To: JP Zhu <zhujp98@GMAIL.COM>

Try tabulate:

proc tabulate noseps; var v1 v2 v3; table (n mean median min max)*f=best5., v1 v2 v3 / rts=8; run;

-------------------------- | | v1 | v2 | v3 | |------+-----+-----+-----| |N | 5| 4| 3| |Mean | 4.4| 5.75| 5| |Median| 3| 6| 5| |Min | 1| 2| 3| |Max | 8| 9| 7| --------------------------

On Wed, 3 Jun 2009 20:57:28 -0400, Jeff <zhujp98@GMAIL.COM> wrote:

>data t1; >input v1 v2 v3; >cards; >1 2 3 >3 4 5 >8 9 . >2 8 7 >8 . . >; >run; >proc means data=t1 mean median; >var _all_; >output out=opt; >run; > >In this way the opt contians: >_stat_ v1 v2 v3 >n ------------------- >min ------------ >max----------- >mean---------- >std--------------- > >I also want opt to include medians for all variables. >The expect result should like > >_stat_ v1 v2 v3 >mean >median > >how can I do that? >Thanks, >Jeff


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