Date: Wed, 14 Jun 2006 18:47:13 -0400
Reply-To: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Venky Chakravarthy <swovcc@HOTMAIL.COM>
Subject: Re: Mathematical function for power of??
It is worthwhile to have this page bookmarked for future reference:
http://support.sas.com/onlinedoc/913/getDoc/en/lrcon.hlp/a000780367.htm
For your immediate question. The power of x raised to n is represented by:
x**n
So in your case
y = val**po ;
Hope this helps.
Venky Chakravarthy
On Wed, 14 Jun 2006 22:11:49 -0000, sa polo <solouga5@REDIFFMAIL.COM>
wrote:
>
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