Date: Wed, 14 Jun 2006 15:45:55 -0700 "Terjeson, Mark (IM&R)" "SAS(r) Discussion" "Terjeson, Mark (IM&R)" Re: Mathematical function for power of?? To: sa polo A<20060614221149.31355.qmail@webmail53.rediffmail.com> text/plain; charset="iso-8859-1"

Hi,

data x; val=24 ;po=4; y=val**po; output; val=24 ;po=2; y=val**po; output; val=24 ;po=5; y=val**po; output; val=24 ;po=1; y=val**po; output; val=24 ;po=2; y=val**po; output; run;

Mark Terjeson Senior Programmer Analyst, IM&R Russell Investment Group

Russell Global Leaders in Multi-Manager Investing

-----Original Message----- From: SAS(r) Discussion [mailto:SAS-L@LISTSERV.UGA.EDU] On Behalf Of sa polo Sent: Wednesday, June 14, 2006 3:12 PM To: SAS-L@LISTSERV.UGA.EDU Subject: Mathematical function for power of??

Hi,

I have a dataset with:

data x; val=24 ;po=4; val=24 ;po=2; val=24 ;po=5; val=24 ;po=1; val=24 ;po=2; run;

I need to calculate the value of a variable y based on val and po(which is a power of variable). Is there a mathematical function to do this

Desired result:

y=24*24*24*24; y=24*24; y=24*24*24*24*24; y=24; y=24*24

Thanks, SP

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