|
Rahul,
I'm not sure I entirely understand what you want for results,
You say newscore s/b 80, 81, 82.. but your example has 80, 120, 160...
so maybe something like :
do newscore = 80 to 800 by 40;
goododd = 2**((newscore-200) /40);
end;
hth,
Dennis Diskin
> -----Original Message-----
> From: RAHUL CHAHAL [SMTP:rahulchahal@YAHOO.COM]
> Sent: Thursday, September 20, 2001 5:22 PM
> To: SAS-L@LISTSERV.UGA.EDU
> Subject: Suggestion on loop requested
>
> I would like to write a loop such that I have
> "goododd" for newscore starting at 80 and incrementing
> by 1 ie 80 81 82 .... uptp 800.
> The base value is for goododd=1
>
> if goododd=0.125 then newscore=80;
> if goododd=0.25 then newscored=120;
> if goododd=0.5 then newscored=160;
>
> if goododd=1 then newscored=200; /* Base */
>
> if goododd=2 then newscored=240;
> if goododd=4 then newscored=280;
> if goododd=8 then newscored=320;
> if goododd=16 then newscored=360;
> if goododd=32 then newscored=400;
>
> The solution I am able to think of:
> baseodd=1;
> do i=1 to 2 by 0.05;
> if goododd=1*(1+baseodd/20) then score=score+(i);
> end;
> baseodd=2;
> do i=2 to 4 by 0.10;
> if goododd=1*(1+baseodd/20) then score=score+(i);
> end;
> and so on ...
>
> Could someone help me out since my brain seems to be
> slow today. Thanks for your help.
>
>
> __________________________________________________
> Terrorist Attacks on U.S. - How can you help?
> Donate cash, emergency relief information
> http://dailynews.yahoo.com/fc/US/Emergency_Information/
|