- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
To clarify, I was looking at the success rate of obtaining an adequate image, using two different ultrasound windows, in the same participant. Then we repeated this experiment for 30 different participants.
So each participant had the two views attempted, and the success rates of obtaining a good view for each attempt was recorded. So the data is paired, and our results are as follows:
Success Failure
View 1 30 0
View 2 26 4
My understanding is that I cannot run a Fisher’s exact test as the data is not independent. And it will not run anyways with a zero value cell.
So I tried rearranging the data and running a McNemar test.
View 2
Success Failure
View 1 Success 26 4
Failure 0 0
But the McNemar would not run because of the zero value in cell c.
I needed a p-value for these results and I’m at a loss as to what to do! I use SAS for analysis. Any pointers would be much appreciated.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you run an exact McNemar test?
data have;
input view success count ;
datalines;
1 1 30
1 0 0
2 1 26
2 0 4
;
run;
proc freq data=have;
weight count;
tables view*success / agree;
exact mcnem;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you try logistic regression via PROC CATMOD ?
or POINT option of PROC FREQ.
data x;
input x $ Y $ w;
cards;
a a 30
a b 0
b a 26
b b 4
;
run;
proc freq data=x;
table x*y/fisher;
exact fisher /point;
weight w;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Did you run an exact McNemar test?
data have;
input view success count ;
datalines;
1 1 30
1 0 0
2 1 26
2 0 4
;
run;
proc freq data=have;
weight count;
tables view*success / agree;
exact mcnem;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you @Miracle!
Much appreciate you pointing me in the right direction.
My data set is paired and binary, and has multiple zero cells. So definitely a McNemar exact test and I specified the zeros option, so that SAS recognizes the zero cells in the calculation.
After rearranging the data set appropriately for a McNemar test, it looked like this.
The code to run in this situation is:
data viewcomp;
input view1 $ view2 $ count;
cards;
Success Success 26
Success Failure 4
Failure Success 0
Failure Failure 0
;
run;
proc freq data = viewcomp;
weight count / zeros;
tables view1*view2 / agree;
exact mcnem;
run;
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Ahmed_Hegazy You should have marked @Miracle answer as correct, not your own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@Miracletakes credit for pointing me in the right direction with the exact test, so happy to do that.
For future reference, and for who-ever reads this post I will point out the following. The correct data arrangement for this answer stem is presented in @Ahmed_Hegazyanswer. In addition, the zeros statement makes SAS use the zero cell for the calculation. So the SAS code presented in my answer is the one to be used for this stem.@Miracle is to be thanked (profusely) for his contribution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
You presented two tables, see your initial post - they are different outcomes.
He used the first one...there's really no way to have known which one was correct, after all, it's your data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The first table would be appropriate for a running a Fisher’s exact or Chi square with independent outcomes, which is not applicable to this scenario.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Yes @Ahmed_Hegazy, you are correct in terms of the data structure to do the tests.
We always learn from each other