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 (November 2004, week 4)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:         Fri, 26 Nov 2004 12:03:04 -0500
Reply-To:     Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:      Re: How to determine ........

Ben,

If you add a merge to the end of Ya's suggested solution, you will end up with one file that contains your stated desired result.

i.e.,

data xx; input x1-x6; cards; 1 2 1 2 1 2 1 2 1 1 1 1 1 2 1 2 1 2 1 1 1 2 1 2 1 4 4 4 1 2 run; data xx; set xx; rn=_n_; run; proc transpose data=xx out=yy; by rn; run; proc univariate data=yy; by rn; output out=mod mode=mode; run; data xx (drop=rn); merge xx mod; by rn; run;

However, since 'mode' is defined as the most frequent score, proc univariate's output will be misleading when there is a tie for most frequent score.

Art ----- "Ben" <benpub7@YAHOO.COM> wrote in message news:200411261205.iAQC5Br9013507@listserv.cc.uga.edu... > the mode of a series values in one oberservation? > > mode(1,2,1,2,1,2)=1; > mode(1,2,1,1,1,1)=1; > .............. > > thanks.


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