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-2026-white.png



April 27 – 30 | Gaylord Texan | Grapevine, Texas

Registration is open

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 lock in 2025 pricing—just $495!

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 4 replies
  • 8282 views
  • 0 likes
  • 3 in conversation