BookmarkSubscribeRSS Feed
jawon
Fluorite | Level 6
This is a SAS proc question, but at the core a statistics question.

I've used proc ttest and other statistical procedures for comparing averages of different groups. But what proc would I use to compare "sample percentages"? I'm guessing it may depend on how my data is laid out, so I'll provide a couple possibilities...

1. DETAILED data
Team Person_id Cancelled_flag
A 123 Y
A 456 N
B 789 Y
B 555 Y

2. Or SUMMARIZED data
Team Total_count Cancelled_count
A 100 40
B 120 50
1 REPLY 1
Doc_Duke
Rhodochrosite | Level 12
PROC FREQ will do both of these.

1) is the natural way.

PRC FREQ; TABLES team*cancelled_flag/chisq; RUN;

2) requires data in slightly different format

team cancelled_flag count
a y 40
a n 60
b y 50
b n 70

Then the proc looks like
PROC FREQ;
TABLES team*cancelled_flag/CHISQ;
WEIGHT count;
RUN;

Ready to join fellow brilliant minds for the SAS Hackathon?

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

Register today!
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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 661 views
  • 0 likes
  • 2 in conversation