Date:  Tue, 4 Oct 2005 20:15:24 0400 
ReplyTo:  "Howard Schreier <hs AT dcsug DOT org>" <nospam@HOWLES.COM> 
Sender:  "SAS(r) Discussion" <SASL@LISTSERV.UGA.EDU> 
From:  "Howard Schreier <hs AT dcsug DOT org>" <nospam@HOWLES.COM> 
Subject:  Re: how to make one formula from diferent records? 
ContentType:  text/plain; charset=ISO88591 
PROC TRANSPOSE, as in
data finally;
input diff COUNT PERCENT;
cards;
0 6 27.2727
1 11 50.0000
2 3 13.6364
3 2 9.0909
;
proc transpose data=finally prefix=diff
out=across(rename = (diff0 = a
diff1 = b
diff2 = c
diff3 = d)
drop = _name_)
;
id diff;
var percent;
run;
data _null_;
set across;
X1=a/b +c*d;
X2=(a+b) / (cd);
X3=(ab) / (a+b+c+d/2);
put ( x : )( = );
run;
Result:
X1=124.51260276 X2=16.999824002 X3=0.238095512
On Mon, 3 Oct 2005 13:22:40 0300, Adriano Rodrigues <drinbet@YAHOO.COM.BR>
wrote:
>Hi all?
>
>suposse this data (i finally got and exported after many calculations):
>
>Obs diff COUNT PERCENT
>
>1 0 6 27.2727
>
>2 1 11 50.0000
>
>3 2 3 13.6364
>
>4 3 2 9.0909
>
>
>
>Now i need make varoius formulas for X, like:
>
>
>
>1) X1=a/b +c*d
>
>2) X2=(a+b) / (cd)
>
>3) X3=(ab) / (a+b+c+d/2)
>
>
>
>etc...
>
>
>
>where:
>
>a= percent of record where diff=0
>
>b= percent of record where diff=1
>
>c= percent of record where diff=2
>
>d= percent of record where diff=3
>
>
>
>my variable diff is always ordened
>
>
>
>its possible?
>
>
>
>thx in advance,
>
>Adriano
>
>
>
>
>
>
> Novo Yahoo! Messenger com voz: ligações, Yahoo! Avatars, novos emoticons
e muito mais. Instale agora!
