BookmarkSubscribeRSS Feed
Liamb
Obsidian | Level 7

Hello,

Is it possible to perform the Paired Wilcoxon test and the McNemar using the Paired variable in the dataset below? Or do I have to transform the data to use proc univariate (diff)?

Thanks

data match;
  input Id $  case_control $ match_caseid $ paired age gender $ weight ethnic $;
datalines;
A1 Case    A1 1 20 F 56 Balck
A2 Control A1 1 23 F 60 Black
A3 Control A1 1 22 F 65 Black
B1 Case    B1 2 30 M 70 Asian
B2 Control B1 2 35 M 47 Asian
B3 Control B1 2 33 M 75 Unknown
C1 Case    C1 3 40 M 80 White
C2 Control C1 3 38 M 73 White
D1 Case    D1 4 47 M 50 Other
D2 Control D1 4 41 M 58 Other 
D3 Control D1 4 50 M 49 Unknown
D4 Control D1 4 63 M 77 Other
run;
4 REPLIES 4
ballardw
Super User

How do you expect to use a PAIRED test with THREE values?

 

Pair very strongly implies 2. And in the case of paired statistics pretty much a requirement.

 

Perhaps you need to rephrase exactly the meaning of the resulting test instead of requiring a specific test.

Liamb
Obsidian | Level 7
Case were match to 1, 2 or 3 controls so a case with 1 control corresponds
to 1 pair, a case with 2 controls corresponds to 2 pairs and a case with 3
controls corresponds to 3 pairs.
Liamb
Obsidian | Level 7

 

Cases were matched with 1 or several controls (match_caseid) and I want to perform Wilcoxon signed rank test and the McNemar using case_control and Paired variables in the dataset below? It is possible?

Thanks

 

data match;
  input Id $  case_control $ match_caseid $ paired age gender $ weight ethnic $ ;
datalines;
A1 Case    .  1 20 F 56 Balck
A2 Control A1 1 23 F 60 Black
A3 Control A1 1 22 F 65 Black
B1 Case    .  2 30 M 70 Asian
B2 Control B1 2 35 M 47 Asian
B3 Control B1 2 33 M 75 Unknown
C1 Case    .  3 40 M 80 White
C2 Control C1 3 38 M 73 White
D1 Case    .  4 47 M 50 Other
D2 Control D1 4 41 M 58 Other
D3 Control D1 4 50 F 49 Unknown
D4 Control D1 4 63 M 77 Other
run;
Ksharp
Super User
I don't understand, there is not Paired Wilcoxon test, Wilcoxon signed rank is just the non-parameter version of pair ttest ,it is for continuous variable ,not category variable.

But McNemar test is for the paired category variable(a.k.a freq/count data).
There are two different statistical method.

And since it is about stat question,better post it at stat forum:

https://communities.sas.com/t5/Statistical-Procedures/bd-p/statistical_procedures

and @StatDave maybe give you a help.

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

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
  • 4 replies
  • 628 views
  • 1 like
  • 3 in conversation