Turn on suggestions

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

Showing results for

- Home
- /
- Programming
- /
- SAS Procedures
- /
- Re: Proc freq for 7x2 table, significant; how to pairwise

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 04-26-2016 12:26 PM
(3048 views)

I have age, gender (M,F) and sites (1,2,...7) columns, and I used proc freq to test (sites, gender ) and it showed p<0.001.

```
proc freq data= demo_sites ;
tables gender*sites_signup /chisq;
run;
```

But, how to do a pairwised chi-square test? I want to see which two groups are signigicant, and which two are not.

can I use **proc multtest** in this case?

A similar question for testing means of age in the 7 sites groups. I can use proc anova or proc glm to do a ANOVA test.

Is the solution to use **proc multtest** and contrast statement, like http://www.ats.ucla.edu/stat/sas/library/multtest.htm?

1 ACCEPTED SOLUTION

Accepted Solutions

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

Regarding the testing of means, the LSMEANS statement in PROC GLM provides all of the options you need to compare all means in as many ways as you can think of, and adjust for the multiple comparisons using several methods.

```
proc glm data=yourdata;
class site;
model age=site;
lsmeans site/pdiff stderr cl adjust=sidak;
run;
```

This gives a Sidak adjustment for the 21 comparisons possible between the mean ages at the 7 sites.

Steve Denham

4 REPLIES 4

- 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!! it is CELLCHI2.

With your hints I found one example:

Thank you again!

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

Regarding the testing of means, the LSMEANS statement in PROC GLM provides all of the options you need to compare all means in as many ways as you can think of, and adjust for the multiple comparisons using several methods.

```
proc glm data=yourdata;
class site;
model age=site;
lsmeans site/pdiff stderr cl adjust=sidak;
run;
```

This gives a Sidak adjustment for the 21 comparisons possible between the mean ages at the 7 sites.

Steve Denham

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

@SteveDenham Yes! This works excellently!

📢

**ANNOUNCEMENT**

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events.** **

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

Find more tutorials on the SAS Users YouTube channel.