Analysis of Power

26
In SAS March 11, 2013 - Mariya Cheryomina

description

Analysis of Power. In SAS March 11, 2013 - Mariya Cheryomina. Power. power ( π ) + β = 1 β = ( 1 - π ) = probability of accepting false Ho ( ie . reject true Ha) - probability of Type II error – false positive - PowerPoint PPT Presentation

Transcript of Analysis of Power

Page 1: Analysis of Power

In SAS

March 11, 2013 - Mariya Cheryomina

Page 2: Analysis of Power

power (π) + β = 1 β = (1- π) = probability of accepting false Ho

(ie. reject true Ha) - probability of Type II error – false positive Power (π) = (1- β) = probability of

detecting a difference when a difference does exist

- probability of accepting true Ha (ie. reject false Ho)

– how sensitive your test is to the existing difference between the compared samples

Page 3: Analysis of Power
Page 4: Analysis of Power

Generally, the minimal sufficient (acceptable) value of power is 0.80

π ≥ 0.80

Page 5: Analysis of Power

1) Before gathering data To determine the minimal sample size

needed to have desired power in statistical testing (to detect a particular effect size)

2) After gathering data To determine the magnitude of power that

your statistical test will have given the sample parameters (n and s) and the magnitude of the effect that you want to detect

Page 6: Analysis of Power

Sample size (n)

Standard deviation (s)

Alpha level (α )

Size of effect/difference that you want to detect

Type of statistical test performed

Page 7: Analysis of Power

One-sample t-test

One-way Anova

Page 8: Analysis of Power

proc power;onesamplemeans (type of statistical test you want the power to be

calculated for)

mean = ____ (difference you are interested in detecting)

ntotal = ____ (sample size)

stddev = ____power = ____ ; run;

*One of the four variables must be left blank – this is what you want SAS to calculate

Page 9: Analysis of Power

You are asked to determine whether the use of a new soil type leads to a significantly different average height of young pine trees on plantation (compared to the historical/hypotherical mean height of 110cm recorded with the old soil type). You want to conduct a one-sample t test with a 2-sided α = 0.05. You select150 trees (n). You decide that the minimal difference in height worth addressing is 8cm (effect size)

α = 0.05s = 40 n = 150“mean” = 8 (effect size)

What will the power of your statistical test be? Ho: = 110cm Ha: ≤ 102cm OR ≥ 118cm

Page 10: Analysis of Power

SAS text:

proc power;onesamplemeansmean = 8ntotal = 150stddev = 40power = .;run;

*Unless you indicate otherwise, SAS will automatically assume that α = 0.05

Page 11: Analysis of Power

There is a there is a probability of 0.68 that the t test will produce a significant result indicating a difference in mean tree height of at least 8cm

Page 12: Analysis of Power
Page 13: Analysis of Power

Sample size Standard deviation

Page 14: Analysis of Power

You are interested in finding out how the changes in samples size (n), standard deviation (s) and minimal effect size of interest (“mean”) will effect the power of your one-sample t- test:

proc power;onesamplemeansmean = 5 10ntotal = 150stddev = 30 50power = .;plot x=n min=100 max=200; run;

Page 15: Analysis of Power
Page 16: Analysis of Power

Effect size

Increasing sample size does not infinitely increase power

Page 17: Analysis of Power

Example 2:You want to compare the average diversity of Canada’s

native bee species in four types of habitat:1) Urban2) Agricultural : Monoculture plantations (with pesticide use)3) Agricultural : Organic farms (no pesticide use)4) National parks

Ho: μ1 = μ2 = μ3 = μ4

Ha: one of μ is different

Page 18: Analysis of Power

What is the minimal number of sites of each habitat type that needs to be surveyed (ie. minimal sample size of each group) to detect whether a significant difference in bee species diversity exists between any of the four habitat types?

(using a one-way Anova test with α = 0.05) The desired power of 0.9.

Page 19: Analysis of Power

*Analysis of power usually involves a number of simplifying assumptions

Assumptions:Average number of bee species surveyed per site in Canada

is ~35 species with a standard deviation of ~ 10 species Based on available research, you predict the following

average bee species diversity for each habitat type:1) Urban - 25 species2) Monoculture plantations - 30 species3) Organic farms– 40 species4) National parks – 45 species

*Assume that all groups have the same stdev (s)

All numbers used in example were invented for the purpose of the exercise

Page 20: Analysis of Power

proc power ; onewayanova groupmeans = 25| 30 | 40 | 45 stddev = 10alpha = 0.05 npergroup = . power = .9;run;

Page 21: Analysis of Power

SAS finds the group sample size that gives a power (actual power) closest to the power you desire (ie. to the nominal power)

Page 22: Analysis of Power

You will need to survey at least 7 locations with each of the four habitat types (ie. 7 urban sites, etc.) to detect the desired (significant) difference between the mean diversities of bee species found at each of the habitat types

Page 23: Analysis of Power

Now you are trying to detect a smaller difference between sample means (at a significant level)

Observe the new minimal sample size for each group

Page 24: Analysis of Power

Sample size (↑)X approaches when n approaches N

Standard deviation (↓)Difference between samples is less likely to cur simply due to random

sampling effects

(α ) (↑)Higher α leads to lower β which results in higher power (ie. the more

willing you are to reject Ho, the less likely you are to accept false Ho, which leads to a higher probability of detecting a truly existing significant difference)

Minimal effect size (↑) (difference that you want to detect) A large difference between samples is less likely to occur due to random

variability between samples than a small difference is

Page 25: Analysis of Power

When you are expecting a large effect size, but are not fully confident that the true effect is as large, use a larger sample size (ie. one that the analysis of power suggests for detecting a smaller effect )

Page 26: Analysis of Power

Analysis of power for Anova (in SAS):http://www.ats.ucla.edu/stat/sas/dae/fpower.htm

Analysis of power for one-sample and two-sample t-tests (in SAS):

http://support.sas.com/rnd/app/papers/power.pdf