BookmarkSubscribeRSS Feed
hdrew
Calcite | Level 5

I am using this SAS code for Variable Summary report and receiving an error message:  log is telling me the variable "auto" and "v1" doesn't exist

 

following SAS Code:


ods graphics on;
proc cluster method=average std pseudo noeigen outtree=tree;
id auto;
var v1-v4;
run;
proc tree horizontal;
run;

1 REPLY 1
Reeza
Super User

You do not have a DATA= option on the PROC statement which data set to use. By default it uses the last run data set, which is likely not what you want in this case since it doesn't have the variables. This is a style of programming I would never recommend, it's always better to explicitly specify the data set used in a procedure. 

 


@hdrew wrote:

I am using this SAS code for Variable Summary report and receiving an error message:  log is telling me the variable "auto" and "v1" doesn't exist

 

following SAS Code:


ods graphics on;
proc cluster data=inputDataSet method=average std pseudo noeigen outtree=tree;
id auto;
var v1-v4;
run;
proc tree data=tree horizontal;
run;


 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

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
  • 1 reply
  • 398 views
  • 1 like
  • 2 in conversation