Data visualization with SAS programming

Custom Scatter Plot

Reply
Frequent Contributor
Frequent Contributor
Posts: 109

Custom Scatter Plot

[ Edited ]

I have run a proc glm model (Outcome = continuous with two continous predictors). With the Ods Graphics and Plots active it provided the below contour plot. I love components of this plot for explaining the project.

 

However, my final model has 3 continuous predictors, so SAS does not generate the plot. I would like to reproduce the plot without the color contouring and I would like the dots to be color coded based on the quartiles of the third predictor. Which this seems achievable, but i have no idea how to put on the diagonal lines that represent the dependent variable into a graph.

 

So dataset would contain

 

Y: continous variable

X1: continuous variable

X2: continuous variable

X3: continuous variable, categorized into quartile and used to shade observations on the plot.

 

 

Frequent Contributor
Frequent Contributor
Posts: 109

Re: Custom Scatter Plot

[ Edited ]

Original Plot

 

Attachment
SAS Super FREQ
Posts: 3,406

Re: Custom Scatter Plot

What version of SAS are you running?

Frequent Contributor
Frequent Contributor
Posts: 109

Re: Custom Scatter Plot

9.4

 

Probably original release.

Frequent Contributor
Frequent Contributor
Posts: 109

Re: Custom Scatter Plot

[ Edited ]
ods graphics on  ;
proc glm data=dka_please 	PLOTS=all;
	model HOURS_PH_NORM = 
		total_fluid 
		INTITIAL_PH;
run;
ods graphics off;

 Code is above for 2 IV model. In the final graph I would like to use labels to get rid of "_" and add units to variable names.

 

Side note, your Sim book was great Rick.

 

Ask a Question
Discussion stats
  • 4 replies
  • 386 views
  • 0 likes
  • 2 in conversation