Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- Equivalence test in PROC POWER

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 02-27-2014 11:26 AM
(3423 views)

So I want to do an equivalence test on a continuous variable in PROC POWER. We have two groups. We can assume the same standard deviation in each group (say 8). So I want the null to be that the difference between the two groups is > 4 (say) and that the alternative to be that the difference is <= 4. So if I can reject the null I can say "The difference between the two groups is at most 4."

Okay, here is the SAS code from an example in SAS PROC POWER help.

proc power;

twosamplemeans test=equiv_diff

lower = 2

upper = 5

meandiff = 4

stddev = 8

ntotal = .

power = 0.9;

run;

I don't understand what LOWER and UPPER are or why they're necessary. I've experimented with changing their values and the resulting N changes sometimes but I don't really know why. But beyond that, I don't know why a LOWER and UPPER are necessary to begin with. It seems that the problem is completely specified even without them. I tried simply removing LOWER and UPPER and when I do the SAS Log says they are required. Any idea what I'm missing? Thanks in advance.

2 REPLIES 2

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi,

I am not in expert in this, and powercalculations is not something I do often. Though, I think I know what happens, anyone are welcome to correct me if I am wrong.

I think you should specifiy "test=diff" instead, because your test is a two-sided test.

The equiv_diff allows you to specify two one-sided tests, and therefore you both need to specify the upper alternative and the lower alternative. This is not what you what if I understood you correct.

I suggest this code, which was generated by the SAS power and sample size application:

proc power;

TwoSampleMeans test=diff

Alpha = 0.05

Sides = 2

MeanDiff = 4

StdDev = 8

Power = 0.8

NTotal = .

NFractional ;

run

Best.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I think I have figured it out. Although your answer wasn't right it did lead me to realize what I was doing wrong.

TEST=DIFF is for when your alternative hypothesis is that the two groups are different. But I am doing an equivalence test, which means my alternative hypothesis is that the two groups are the same, or at least that the difference between the two groups is less than some specified number, and thus I want to use TEST=EQUIV_DIFF.

In my original example I wanted to show that the difference between the two groups is at most 4. I put that number (4) in the MEANDIFF line. But if I wanted to show that the difference between the two groups was 4 then I should've used LOWER=-4 and UPPER=4. LOWER and UPPER are the largest difference we'll allow between the two groups in each direction. In an ordinary equivalence test LOWER and UPPER will have the same absolute value.

OTOH, MEANDIFF is the difference in the means between the two groups that we are going to assume exists. If we assume the two groups have the same mean then MEANDIFF=0.

In my original example I wanted to answer the following question: Assuming two groups have the same mean and also that both groups have a standard deviation of 8 and also assuming the two groups are equivalently sized, what is our required total N to have 90% power for an equivalency test to show that the difference between the two groups is at most 4? Here is the code that answer that question. We're also assuming a 0.05 alpha level but that is such a common assumption that we don't need to code for it.

proc power;

twosamplemeans test=equiv_diff

lower = -4

upper = 4

meandiff = 0

stddev = 8

ntotal = .

power = 0.9;

run;

**Available on demand!**

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

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.