Help using Base SAS procedures

Scatterplot for Grouped Data

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 13
Accepted Solution

Scatterplot for Grouped Data

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.


Accepted Solutions
Solution
‎06-14-2013 03:42 PM
Super User
Posts: 10,500

Re: Scatterplot for Grouped Data

Take a look at what happens with:

proc gplot data=datafile;

plot Y*X= ind;

run;

View solution in original post


All Replies
Solution
‎06-14-2013 03:42 PM
Super User
Posts: 10,500

Re: Scatterplot for Grouped Data

Take a look at what happens with:

proc gplot data=datafile;

plot Y*X= ind;

run;

Occasional Contributor
Posts: 13

Re: Scatterplot for Grouped Data

Thanks. That seems to have worked.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 142 views
  • 0 likes
  • 2 in conversation