BookmarkSubscribeRSS Feed
ryanh
Calcite | Level 5

Hello all,

 

Very new undergraduate SAS user here - trying to bring myself up to speed on some procedures. 

What are the procedures for transforming variables in SAS Enterprose? In my case, I have a dataset for an internship that is giving me a curvinlinear "residual by predicted" graph after running a linear regression on my data.  I want to transform the variables via a model in order to have them become more linear.  What are my options

 

Here is a very short dataset that is representative of what I am trying to transform

 

x: 10 15 20 30 40 50 60

y (dep): 700 550 400 270 190 130 100

 

right now it is giving me a "smiley face" and I am looking for a model to transform it and the what I have to do to the variables.

 

5 REPLIES 5
TomKari
Onyx | Level 15

I was taught to try the log of one or both variables first. In your case, log(y) seems to come out nicely linear.

 

Tom

ryanh
Calcite | Level 5
Tom, thanks.

So in that case would I just change the input data to reflect logs of y instead of the given values and still run as a linear regression? or do I run it as a different kind of regression?

Sorry for the naive questions, I am very new at this and trying to teach myself as I go before I take an in-depth class on it next semester.
Reeza
Super User

FYI the first course on statistics with SAS is free if you're interested. 

Search SAS Analytics U community forum and see the right hand menu. 

TomKari
Onyx | Level 15

I'm on somewhat thin ice here, but fortunately @Reeza is watching this also, so she'll put me straight if I stray.

 

Yes, just use log(y) instead of y, and run your linear regression.

Reeza
Super User

@TomKari Is correct. 

 

 

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 5 replies
  • 798 views
  • 0 likes
  • 3 in conversation