I've been instructed to produce a scatterplot between a response and predictor, grouped by an indicator variable. I am supposed to have one scatterplot show the different levels of the indicator variable. I am using a limited, remote version of SAS - so there are some procedures I can't really use. I'm limited to using proc reg or proc gplot.
This is what I have tried, but what it does it produce two separate scatterplots for each level of the indicator:
goptions reset = all;
symbol1 v=dot c=red h=1;
symbol2 v=plus c=blue h=2;
proc gplot data=datafile;
plot Y*X;
by ind;
run;
I have also tried:
proc reg data=datafile;
model Y = X;
plot Y*X;
by ind;
run;
I have tried other variations, and have also sorted by the indicator beforehand. Any help would be appreciated.
Take a look at what happens with:
proc gplot data=datafile;
plot Y*X= ind;
run;
Take a look at what happens with:
proc gplot data=datafile;
plot Y*X= ind;
run;
Thanks. That seems to have worked.
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.
Ready to level-up your skills? Choose your own adventure.