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?
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?
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.
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!
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.
Ready to level-up your skills? Choose your own adventure.