02-25-2016 04:29 PM
I am using Proc REG and using plots=predictions(x=SMQ720) statement. I just want the graph that shown predicted values and smq720 on x-axis. How to just create that graph only and save it in a library. Also, can I craete the same graph if I use SURVEYREG?
02-25-2016 05:34 PM
You can use the below code as an example to help you. In the quotes within ods listing gpath, put the output folder that you want the output to go to.
ods listing gpath = "yourdestination";
ods select predictionpanel;
proc reg data = sashelp.cars plots = prediction(x=weight);
model horsepower = weight;
ODS TRACE ON was used to find the names of the outputs in Proc Reg, and then ODS SELECT was used to just select the prediction plots. Another alternative you could use is to output the dataset using output out statements and then plot the graph.
02-25-2016 06:03 PM
Thank you so much. Predicton panel is still a two-part. First part is predicted values plotted against X and second part is residuals plotted against X. Is there a way to just plot the first part. Can we do the same if using Proc Surveyreg?
02-25-2016 06:12 PM
You're welcome. Instead of ods select Predictionpanel try using this instead ods select FitPlot;
I'm not sure about Proc Surveyreg but the procedures should be similar. Either use ods select to select the plot you want, or output the dataset using output out = data and then plot the graph, and then output the graph as before using ods listing gpath.