BookmarkSubscribeRSS Feed
mpiotro2
Calcite | Level 5

I'm working with the SAS University Edition, and I'm having trouble creating a scatter plot from a dataset with three X variables. It seems like this should be really simple, but I can only seem to add one X value. I have a homework assignment where my instructor asked us to "Plot the observed data and the two fitted regressions on one plot (this is probably easiest done by hand over a scatterplot of the data)." Here is the data set: 

 

ObsCITYYX1X2X3
1111.258716.56.2
2213.464320.56.4
3340.763526.39.3
445.369216.55.3
5524.8124819.27.3
6612.764316.55.9
7720.9196420.26.4
8835.7153121.37.6
998.771317.24.9
10109.674914.36.4
111114.5789518.16
121226.976223.17.4
131315.7279319.15.8
141436.274124.78.6
151518.162518.66.5
161628.985424.98.3
171714.971617.96.7
181825.892122.48.6
191921.759520.28.4
202025.7335316.96.7
4 REPLIES 4
PeterClemmensen
Tourmaline | Level 20

Can you provide an example of what such a plot would look like?

mpiotro2
Calcite | Level 5

I don't think so, because I'm not even sure what it would look like myself... unless my instructor means I should create a separate scatterplot for each X variable? 

mpiotro2
Calcite | Level 5

I think he's asking us to do something like what's being done in this video using a different program... https://www.youtube.com/watch?v=_5kRBBqQhA0

 

 

PaigeMiller
Diamond | Level 26

PROC SGSCATTER will create such a scatterplot with 3 x-variables and one-y variable. An example is given here:

https://documentation.sas.com/?docsetId=grstatproc&docsetVersion=9.4&docsetTarget=p0yb5lnzixgxoxn186...

--
Paige Miller

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
  • 4 replies
  • 6507 views
  • 0 likes
  • 3 in conversation