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
- /
- Analytics
- /
- Stat Procs
- /
- What Proc to get descriptive statistics and test m...

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

01-22-2013 03:26 PM

Hi, I am relatively new to SAS and I have a question on what Proc should I use.

I have a dataset that is categorized by two classes, e.g. Scenarios A,B,C and also Status Active Inactive. I hope to create a table where I can get the mean, median, s.d.,min,max for each category and also to test the differences in both mean and median between Status Active and Inactive for each of the Scenarios A,B,C I mean something below:

Test for Difference between Active and Inactive samples

t-statistic Wilcoxon Z

Scenario A 2,2** 2.8**

Scenario B 3.1*** 2.1**

I know I can use the proc means to get the descriptive statistics that I want, but after reading the guide, Im not sure how to proceed to get the mean and median difference test. Must I separate my dataset into 3 dataset based on the 3 scenarios and then run proc ttest and proc npar1way for each of the 3 sub datasets? Or is there a better way that I can use for the combined dataset and generate the desired table format?

Thank you in advance for any help offered!

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

01-22-2013 03:47 PM

Look at PROC TTEST and PROC NPAR1WAY. Use by group processing. First sort your dataset by scenarios. Then, as an example, try:

proc npar1way data=yourdataset median;

by scenario;

class status;

var response;

run;

A similar setup can be used for proc ttest:

proc ttest data=yourdataset;

by scenario;

class status;

var response;

run;

Good luck.

Steve Denham