Contributor
Posts: 71

Calculating percent change and test if percent change is significant in SAS?

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 survey q15_both 0 1 Total Post 27 22 49 30.34 24.72 55.06 55.1 44.9 61.36 48.89 Pre 17 23 40 19.1 25.84 44.94 42.5 57.5 38.64 51.11 Total 44 45 89 49.44 50.56 100 Frequency Missing = 2
Occasional Contributor
Posts: 18

Calculating percent change and test if percent change is significant in SAS?

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

SAS Super FREQ
Posts: 3,842

Calculating percent change and test if percent change is significant in SAS?

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.

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;

Posts: 2,116

Calculating percent change and test if percent change is significant in SAS?

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

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