turn on suggestions

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

Showing results for

Find a Community

- Home
- /
- BI
- /
- Enterprise Guide
- /
- Residuals Chi-square test

Topic Options

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

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-25-2015 09:11 AM

Hi,

First of all, statistics is not my best part , but now I have to do quite a lot of table analysis with chi-square tests.

Therefore, I have to calculate the residuals for each cell.

My question:

Is there any possibility to calculate the standardized residuals by a chi-square test in SAS Enterprise Guide 7.1?

In "Cell statistics", there is choice to indicate "Cell contribution to Pearson Chi-square" e.g.

Or can I better calculate the residuals by myself (excel).

Thanks in advance!

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-25-2015 01:30 PM

I don't know how to do it via point and click. Via code you can request the deviation amount and expected amount. Perhaps those are options in the output statistics section?

I'm not familiar with standardized residuals for chi square tests. Given the statistical nature of this question you may want to post/move it to the SAS Statistical Procedure section instead of EG.

ods trace on;

proc freq data=sashelp.class;

table sex*age/deviation expected;

ods output crosstabfreqs=want;

run;

ods trace off;

proc print data=want;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-26-2015 01:23 AM

Maybe you need this :

proc freq data=sashelp.class;

table sex*age/deviation expected **chisq cellchi2** ;

ods output crosstabfreqs=want;

run;

- Mark as New
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Highlight
- Email to a Friend
- Report Inappropriate Content

04-26-2015 10:39 AM

Ah! Now that I see the SAS code, I can suggest the "point and click" method.

1. With your dataset open, select Describe | Table Analysis.

2. On the "Data" tab, drag your variables into the Table Variables selections.

3. On the "Tables" tab, drag one variable to the top, and the other to the left.

4. On "Cell Statistics", select Cell Frequency ... and Expected Cell Frequency

5. On "Table Statistics" / "Association", select Chi-square tests

Run the task.

How close is this to what you want?

Tom