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-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!

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
  • 12067 views
  • 2 likes
  • 2 in conversation