Hi everybody,
I would like to obtain a surface plot from PROC RSREG (see example below from SAS Support website) which can be customized by my colleagues, in term of color, fonts, movable elements (such as numbers), ....
Would it be possible:
. to create this formta of graphs?
. if not, would it be possible to retreive the coordinates of the isocurves of this graph in order to construct it in another software (Excel, ...)?
Thanking you in advance.
Best regards,
data d;
input Time Temp MBT;
label Time = "Reaction Time (Hours)"
Temp = "Temperature (Degrees Centigrade)"
MBT = "Percent Yield Mercaptobenzothiazole";
datalines;
4.0 250 83.8
20.0 250 81.7
12.0 250 82.4
12.0 250 82.9
12.0 220 84.7
12.0 280 57.9
12.0 250 81.2
6.3 229 81.3
6.3 271 83.1
17.7 229 85.3
17.7 271 72.7
4.0 250 82.0
;
ods graphics on;
proc rsreg data=d plots=(ridge surface);
model MBT=Time Temp / lackfit;
ridge max;
run;
ods graphics off;
In general appearance is controlled by a SAS style. Assuming you are viewing the output as html try adding this statement to your code to see the effect of a different style.
ods html style=meadow;
before the proc statement.
I'm not quite sure what you mean by "movable elements". If you are referring to axis appearance such as tickmarks and labels then I don't think there has been much user control for the statistical graphs such as this one, at least not in 9.2.3 which I'm using.
You can generate an output dataset using the out= option on the Proc statement which from the documentation will contain any ID, By or weight variables in the model statement plus associated requested statistics. I am not sure whether it would contain everything that you need to send to another procedure or program to duplicate the plot depending on the type of plot you want.
Thanks a lot ballardw for your prompt reply.
My problem is that my colleagues are not statisticians, without any SAS knowledge, and they want to customize themselves the plot as they want, using Excel software for example. When I said "movable elements" I would like to say for instance that it can happen that they want to move the number "80" of the corresponding iscocuve to set this number lower in the plot, ...
To summarize, I would like to generate a customizable plot (vector plot?) or retreive the coordinates of the generated isocuves. Following your comments, I thing it will be very difficult or impossible....
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.