BookmarkSubscribeRSS Feed
quentinread
Fluorite | Level 6

I am a big user of the R package DHARMa (https://cran.r-project.org/web/packages/DHARMa/vignettes/DHARMa.html) which produces scaled quantile residuals from fitted GLMMs and does a variety of diagnostic tests on them such as uniformity, overdispersion, and autocorrelation. 

 

I know that it is possible to write a macro in SAS to generate quantile residuals via simulation from a fitted GLIMMIX model and run the diagnostic tests. But I was curious if anyone in the community already has a macro that can do that, that they are willing to share.

 

Thanks in advance for your help!

1 REPLY 1
sbxkoenk
SAS Super FREQ

I'm not aware of any macro for producing "randomized quantile residuals" from fitted GLMs (GENMOD procedure) or GLMMs (GLIMMIX procedure).

 

It shouldn't be difficult to write such a macro ... and you can have a quick-start by asking 

  • Claude Code CLI or
  • Open-AI Codex or
  • GitHub Copilot

to  come up with a first version.

Also, you can submit R-code in your SAS program.
SAS/IML User's Guide
Calling Functions in the R Language
https://go.documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/imlug/imlug_r_toc.htm

 

BR, Koen

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand in the Innovate Hub.

Watch 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
  • 1 reply
  • 85 views
  • 0 likes
  • 2 in conversation