SAS Procedures

Help using Base SAS procedures
BookmarkSubscribeRSS Feed
Kastchei
Pyrite | Level 9
Is there a way of ignoring variable labels when using proc compare? I do not want a variable to show up as having differing attributes if the only thing that is different is the label. Thanks!
4 REPLIES 4
data_null__
Jade | Level 19
A "SAS Variable List" and the ATTRIB statement.

[pre]
data class1;
set sashelp.class;
label name = 'Name';
run;
proc compare base=sashelp.class compare=class1;
attrib _all_ label=' ';
run;
[/pre]
Kastchei
Pyrite | Level 9
That's awesome! Thanks.
data_null__
Jade | Level 19
If you wanted to do similar with formats/informats it is a little different you would need FORMAT and/or INFORMAT statements.

[pre]
data class1;
set sashelp.class;
label name = 'Name';
format _numeric_ 8.1;
run;
proc compare base=sashelp.class compare=class1;
attrib _all_ label=' ';
format _all_;
informat _all_;
run;
[/pre]
Kastchei
Pyrite | Level 9
Again, thank you! Good information.

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 4 replies
  • 14268 views
  • 2 likes
  • 2 in conversation