BookmarkSubscribeRSS Feed
LeeGrenon
Calcite | Level 5

Hello, I am using SAS9.3, the diagnostic plots produced by default with proc reg are very helpful! However, I would like to produce the same diagnostic plots with proc surveyreg. Specifically, plots such as Q-Q, residual versus predicted, residual versus fitted, leverage, Cook's D, studentized residuals, etc. I would be great to be able to create a scatter plot showing the OLS and LOESS lines from proc surveyreg. I have looked through the ODS and survey documentation, but I can't figure out how to produce diagnostic plots when using proc surveyreg. Does anyone have a suggestion?

Have a good day.

4 REPLIES 4
SteveDenham
Jade | Level 19

Here I sit as SGF2012, so I can't pull up the docs that I would if I were in the office.  What might work: get output datasets from SURVEYREG (not sure if there is an output statement, but as always ODS OUTPUT is your friend).  Then it is off to PROC UNIVARIATE for Q-Q plots, or any of the SAS/GRAPH procedures (SGPLOT comes to mind), and you can plot the values obtained.

Hope this helps some.

Steve Denham

LeeGrenon
Calcite | Level 5

Thanks for the suggestion for using  the output statement. it provdies the predicted values, residuals, standard error of the mean predicted value and the lower/upper bounds of the 95% CI for the PROC SURVEYREG. These are the keyword statistics described in the documentation for the output statement for this PROC. What i am additionally hoping to produce are the DFBETAS for my model specified in PROC SURVEYREG. The documentation for DFBETAS discusses several procedures such as REG, GENMOD, GLIMMIX, MIXED & PHREG. DFBETAS don't seem to be available for PROC SURVEYREG. The INFLUENCE option is not recognized with the MODEL statement in PROC SURVEYREG. Do you have any suggestions for producing DFBETAS when using PROC SURVEYREG?

SteveDenham
Jade | Level 19

Other than getting out the X'X matrix, and then doing a whole boatload of programming, I don't see how to do it in SURVEYREG.  I wonder if the observation-wise deletion even makes sense in a survey setting, so that it is just very difficult to interpret.  What occurs when you look at the results from PROC REG, as a guide to identifying influential observations?

Steve Denham

Rick_SAS
SAS Super FREQ

At SGF12, Sharon Lohr gave a keynote talk that included a discussion of diagnostic plots. Her paper is available online: "Using SAS for the design, analysis, and visualization of complex surveys."  The takeaway from the talk is that you can use the diagnostic procs from PROC REG on survey data, provided that you use the survey weights in the WEIGHT stmt. The diagnostic plots are mostly concerned with predicted/resudual values, and these are identical for PROC REG and PROC SURVEYREG.  However, you don't want to use any PROC REG plots that display variance information, such as confidence bands, because the PROC REG variances aren't adjusted for the survey design.

Rick


sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

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