BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
MyNameHere
Fluorite | Level 6

I'm trying to run a test of equivalence on a 2x2 table. I'm not sure what, exactly, I am doing.

 

First, I am trying to understand the difference between the EQUIV features of the BINOMIAL and RISKDIFF table options. When I run the following code, though, all I get is the 2x2 frequency table and nothing about the equivalence of the two rows:

 

 

PROC FREQ ORDER=DATA;
WEIGHT COUNT;
TABLES GROUP*GENDER  / BINOMIAL (EQUIV);
RUN;

My input dataset is (variables Group, Gender, and Count):

Spl1    F    462
Spl1    M    80
Spl2    F    84
Spl2    M    11

 

When I run the following code, I do get several additional tables: risk estimates, equivalence analysis, and TOST.

proc freq order=data;
weight count;
table group*gender / riskdiff (equiv);
run;

 

So, my questions are:

  1. Why does the BINOMIAL version not produce any results?
  2. Does BINOMIAL help me determine the likelihood that the two samples are equivalent?
  3. If so, what is the difference between BINOMIAL and RISKDIFF?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

The Binomial option only works for one-way tables, you are requesting a two-way. Also part of the answer for the Riskdif which does the 2x2 table.

And since you are comparing two variables then Binomial isn't going to be much help though it does show something about the individual variables.

See the results if you use

proc freq order=data;
weight count;
table group gender / binomial (equiv);
run;

View solution in original post

3 REPLIES 3
ballardw
Super User

The Binomial option only works for one-way tables, you are requesting a two-way. Also part of the answer for the Riskdif which does the 2x2 table.

And since you are comparing two variables then Binomial isn't going to be much help though it does show something about the individual variables.

See the results if you use

proc freq order=data;
weight count;
table group gender / binomial (equiv);
run;
StatDave
SAS Super FREQ

If what you want is a test of the hypothesis that the two row (or column) proportions are the same, then just use the CHISQ option as discussed and illustrated in this note

MyNameHere
Fluorite | Level 6

StatDave_sas, I'm glad you responded.

 

The title of the note you cited indicates that it is about testing equality, but it really looks like the standard treatment of demonstrating difference by rejecting the null hypothesis of equality.The example in the article says that the chi-squared test shows that the null hypothesis (of equivalence) is rejected, which is great in this example, so I know the two groups are not equivalent.

 

However, I am looking for a measure of how similar they are, and I need to flip the hypotheses. My "null hypothesis" is that they are different, and I want to be able to reject that. I have found some literature on this topic, but there doesn't seem to be much treatment of this situation.

 

Some literature suggests that using a conventional chi-squared test and seeing a p-value of 0.06, for example, would demonstrate that the two groups were similar, but I object that this is not a strict enough test. That simply means that there is still a 94% chance that they are different, right? (Note that some fields of study seem to think p<0.10 shows a significant difference.) Naively, I would expect to need a p-value > 0.95 in order to say with 95% confidence that the two sets of responses are likely to be the same.

 

From what I have read, the TOST table generated by the  RISKDIFF option seems the appropriate statistic to use to test equivalence in the 2x2 case, but I have no idea what to do in 2x3 (two groups, three response categories) or higher tables.

 

What are your thoughts?

 

Thanks!

 

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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
  • 2551 views
  • 0 likes
  • 3 in conversation