Rick A. answered • 03/25/19

Tutor

5
(33)
Experienced SAS Professional

Here is the correct syntax:

data raa;

x=2;

y=2;

z=3;

xsq=x**y;

xcube=x**z;

run;

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)

Follow
•
1

Add comment

More

Report

Rick A. answered • 03/25/19

Tutor

5
(33)
Experienced SAS Professional

Here is the correct syntax:

data raa;

x=2;

y=2;

z=3;

xsq=x**y;

xcube=x**z;

run;

Ask a question for free

Get a free answer to a quick problem.

Most questions answered within 4 hours.

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.