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 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

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