BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sastuck
Pyrite | Level 9

You're saying it's better to create a new data set every step of the way? That's good advice, but doesn't that essentially mean revising my whole program?

Reeza
Super User

It's your choice to revise your program or not. This is advice to not program in this manner based on over a decade of experience, because its a good way to make mistakes and makes it much harder to find them. And if you ever need to re-run something you have to re-run your full program. 

 


@sastuck wrote:

You're saying it's better to create a new data set every step of the way? That's good advice, but doesn't that essentially mean revising my whole program?


 

ballardw
Super User

First thing:

Habitual use of the source data and out put with the same name replaces the orginal data set. Since you are modifying an existing variable then you may need to go further back in your process to recover the data.

 

When testing code use something like

data ceo_trial;
    set ceo_firm2;
    VOL=VOL/1000;
run;

to prevent accidents with the contents of your source data. Your description: "gives me a table with only the variable volume" sounds like this has already happened as the code you show would not do that. A Keep or drop statement would be more likely to have that result.

 

I would recommend creating new variable(s) to test your scaling on. That way you could have multiple variables in a set such as

Vol1000 = Vol/1000;

Volsq     =Vol*Vol;

Volrt       = sqrt(vol);

 

then in your regression you could use any one or combination of the new variables. And you would still have the original VOL to ensure that the resulting scale was the one you wanted.

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 17 replies
  • 6869 views
  • 4 likes
  • 3 in conversation