BookmarkSubscribeRSS Feed
HyunJee
Fluorite | Level 6

I have a table below of comparing responses for the same question from a pre and post survey.

I want to know the 55.1% is statistically different from 42.5%.

I have no idea how to do this and have been stuck trying to figure this out. Any help you can give is appreciated.

Table of survey by q15_both
surveyq15_both
01Total
Post272249
30.3424.7255.06
55.144.9
61.3648.89
Pre172340
19.125.8444.94
42.557.5
38.6451.11
Total444589
49.4450.56100
Frequency Missing = 2
3 REPLIES 3
SusieQ324
Fluorite | Level 6

Is this the output of a FREQ statement?  If so, add a /CHISQ to your table statement and it'll test it for you.

Rick_SAS
SAS Super FREQ

I'm not an expert, but it sounds like you might want to look up McNemar's test, which is one of the tests for agreement.

See the documentation at http://support.sas.com/documentation/cdl/en/statug/63962/HTML/default/viewer.htm#statug_freq_a000000...

For an example, see http://www.ats.ucla.edu/stat/sas/whatstat/whatstat.htm (search for "McNemar's Test" on the page)

data a;
input survey q freq;
datalines;
0 0 27
0 1 22
1 0 17
1 1 23
;

proc freq data=a;
weight freq;
tables survey*q / agree;
/* or EXACT mcnem; for small samples */
run;

Doc_Duke
Rhodochrosite | Level 12

Rick's right, McNemar's is the test for pre-post observations.  The documentation talks about matched pairs, and pre-post is one kind of matching.  It is testing whether the pairs that were 0-1 are different from the pairs that are 1-0, which is not quite the marginal test that you asked about initially.  Be careful how you set it up; the sample size for McNemar's test is the number of pairs.  In the table you show, it looks like you have broken the matching and have some missing data (N=49 for Post and 40 for Pre?).

If you cannot link the pre-observations to the post-observations, then you are back to the marginal test of homogenity that SusieQ pointed you to.

Doc Muhlbaier

Duke

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 ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 3 replies
  • 4529 views
  • 0 likes
  • 4 in conversation