What am I entering wrong in the following? I am trying to make a graph of factor 2 vs factor 1 and factor 3 vs factor 1
386 proc plot;
387 plot factor2*factor1=brand factor3*factor1=brand;
ERROR: Variable FACTOR2 not found.
ERROR: Variable FACTOR1 not found.
ERROR: Variable BRAND not found.
ERROR: Variable FACTOR3 not found.
ERROR: Variable FACTOR1 not found.
ERROR: Variable BRAND not found.
You missed to write the dataset to be used.
Without data the variables are unknown.
The syntax should be like:
proc plot data=<my_data> <more options> ;
For some procs, if you don't specify a data=, then it will use the last active dataset.
Here's an example:
proc sort data=sashelp.class;
by age;
run;
proc plot;
plot height*weight;
run;
But I would recommend always specifying the data=, so there is no uncertainty, like:
proc plot data=sashelp.class;
plot height*weight;
run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and save with the early bird rate—just $795!
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.
Ready to level-up your skills? Choose your own adventure.