tags:

views:

2168

answers:

2

I may be missing something obvious, but how do you calculate 'powers' in SAS?

Eg X squared, or Y cubed?

what I need is to have variable1 ^ variable2, but cannot find the syntax... (I am using SAS 9.1.3)

+3  A: 

got it! there is no function.

you need to do:

variable1 ** variable2;

Bazil
A: 

data t; num=5; pow=2; res=num**pow; run; proc print data=t; run;

DaveW