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;

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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
  • 595 views
  • 0 likes
  • 2 in conversation