New SAS User

Completely new to SAS or trying something new with SAS? Post here for help getting started.
BookmarkSubscribeRSS Feed
laurenhosking
Quartz | Level 8
How would i go about performing a log y (log transformation) on a single variable in my data set. This is so I’m able to perform a linear regression
6 REPLIES 6
laurenhosking
Quartz | Level 8
I tried this but my data still doesn’t follow a normal dist. Any idea why?
PeterClemmensen
Tourmaline | Level 20

Your data does not have to be normally distributed to run a linear regression.

 

This is a good article on the topic: On the assumptions (and misconceptions) of linear regression .

FreelanceReinh
Jade | Level 19

Hi @PeterClemmensen,

 

I think your link points to "Need to log-transform a distribution? There's a SAS function for that!" (which is also an interesting article), but of course you mean "On the assumptions (and misconceptions) of linear regression."

PeterClemmensen
Tourmaline | Level 20

Oh, yes of course. Corrected, thank you!

ksumbundu
Calcite | Level 5

*Log Transfrom single variable;

 

data work.prac;
set project1.hiv;
LogA = log(A);
LogB = log(B);
run;

Try this. (using log function)

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

Register now!

Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 6 replies
  • 1830 views
  • 0 likes
  • 4 in conversation