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.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 17 replies
  • 4298 views
  • 4 likes
  • 3 in conversation