Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Getting standardized residuals with proc genmod

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

🔒 This topic is **solved** and **locked**.
Need further help from the community? Please
sign in and ask a **new** question.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 03-02-2017 04:46 PM
(5077 views)

I'm having trouble getting output of standardized pearson residuals and standardized deviance residuals in proc genmod. I was able to get non standardize residuals with this code:

output out = overall3 reschi=reschi p=predicted;

but get all missing values when using this code: output out = overallstd stdresdev=stdresdev p=predicted;

Thank you for any assistance

1 ACCEPTED SOLUTION

Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you all-

SAS technical support clarified: The standardized residuals cannot be computed for GEE models. They depend on the deviance or Hessian matrix which isn't involved in the GEE estimation method

7 REPLIES 7

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Please post your full code and log.

I don't have any issues in SAS 9.4M3. Note what SAS version you have, and what SAS/STAT version you have as well.

If the code below doesn't run successfully, include the log.

```
data drug;
input drug$ x r n @@;
datalines;
A .1 1 10 A .23 2 12 A .67 1 9
B .2 3 13 B .3 4 15 B .45 5 16 B .78 5 13
C .04 0 10 C .15 0 11 C .56 1 12 C .7 2 12
D .34 5 10 D .6 5 9 D .7 8 10
E .2 12 20 E .34 15 20 E .56 13 15 E .8 17 20
;
proc genmod data=drug;
class drug;
model r/n = x drug / dist = bin
link = logit
lrci;
output out = overallstd stdresdev=stdresdev p=predicted;
run;
```

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you,

Your example works - I have 9.4 TS1M3

When I try with my own data, however, it is not working.

I note that your dependent variable is r/n . Would this have any implications?

The full code looks like this:

proc genmod data=stigma4 descending ;

class subid adependent (ref="0=No") time (ref="0")

marstat_bl (ref="1=Married/living with partner")

employ_bl (ref="1=Yes") educ9_bl (ref="0=No") msm2_bl (ref="2=N/A") suiclife_bl (ref="0=No")

moddep (ref="0=No") supportmedian (ref="1=Yes") drug_dependent (ref="0=No")/param=ref ;

model negimage_2 = adependent time marstat_bl employ_bl educ9_bl

msm2_bl suiclife_bl moddep supportmedian drug_dependent

mcs pcs hiv_yrs_bl ls_age_bl / dist=bin type3 link=logit lrci;

output out = overallstd stdresdev=stdresdev p=predicted;

repeated subject=subid/ type=ind corrw ;

Your example works - I have 9.4 TS1M3

When I try with my own data, however, it is not working.

I note that your dependent variable is r/n . Would this have any implications?

The full code looks like this:

proc genmod data=stigma4 descending ;

class subid adependent (ref="0=No") time (ref="0")

marstat_bl (ref="1=Married/living with partner")

employ_bl (ref="1=Yes") educ9_bl (ref="0=No") msm2_bl (ref="2=N/A") suiclife_bl (ref="0=No")

moddep (ref="0=No") supportmedian (ref="1=Yes") drug_dependent (ref="0=No")/param=ref ;

model negimage_2 = adependent time marstat_bl employ_bl educ9_bl

msm2_bl suiclife_bl moddep supportmedian drug_dependent

mcs pcs hiv_yrs_bl ls_age_bl / dist=bin type3 link=logit lrci;

output out = overallstd stdresdev=stdresdev p=predicted;

repeated subject=subid/ type=ind corrw ;

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I noticed you are using REPEAT statement, that mean you are fiting GEE.

Can you see the standardized residuals in the output ?

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi - Yes, this is a GEE.

I'm wondering if The standardized residuals cannot be computed mathmatically for GEE models?

I get all missing values in the output.

Thank you!

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

If you can not see standardized residuals in RESULT printed by GEE, then you can not get it,

GEE take residuals as correlation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Thank you all-

SAS technical support clarified: The standardized residuals cannot be computed for GEE models. They depend on the deviance or Hessian matrix which isn't involved in the GEE estimation method

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. **Registration is now open through August 30th**. Visit the SAS Hackathon homepage.

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.