# SAS PROC POWER - PowerPoint PPT Presentation

PPT – SAS PROC POWER PowerPoint presentation | free to download - id: 244212-YzVkM

The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
Title:

## SAS PROC POWER

Description:

### The Power and Sample Size Application, a web interface that provides access to ... Characterize the power of a study to detect a meaningful effect ... – PowerPoint PPT presentation

Number of Views:1091
Avg rating:3.0/5.0
Slides: 65
Provided by: Atk78
Category:
Tags:
Transcript and Presenter's Notes

Title: SAS PROC POWER

1
SAS PROC POWER
November 9, 2005 Linda Atkinson
2
Overview
• New in SAS 9.1
• The POWER procedure for prospective power and
sample size calculations
• The GLMPOWER procedure to perform prospective
analyses for linear models
• The Power and Sample Size Application, a web
sample size computations

3
Definition
In statistical testing, design so that a, Type 1
error (rejecting the null hypothesis H0 when it
is true) is small. Probability of conducting a
Type 2 error (not rejecting H0 when it is false)
designated as ß, and power is usually referred to
as 1-ß (correctly rejecting H0 when it is
false). The POWER procedure uses the more general
definition of power as the probability of
rejecting H0 for any given set of circumstances
(even if it is true).
4
Plot of Power vs Effect Size
5
PROC POWER
• Supports prospective analysis (pertaining to
planning for a future study) to
• Determine the sample size required to get a
(power)
• Characterize the power of a study to detect a
meaningful effect
• Conduct what-if analyses to assess sensitivity of
the power or required sample size to other factors

6
Analyses Covered
• t tests for means
• Equivalence tests for means
• Confidence intervals for means
• Tests of binomial proportions
• Multiple regression
• Tests of correlation and partial correlation
• One-way analysis of variance
• Rank tests for comparing two survival curves

7
Previously in Analyst
8
Input for PROC POWER
• Design
• Statistical model and test
• Significance level (alpha)
• Surmised effects and variability
• Power
• Sample size
• A missing value input for one of these
components identifies it as the result parameter.

9
Example One-Sample t Test
Machine to print logos, can be adjusted if
establish a non-zero mean displacement with high
confidence. Have 150 jerseys to measure, 8 mm is
experience indicates standard deviation is about
40. Proc power onesamplemeans mean 8
ntotal 150 stddev 40 power . run
10
Proc Power Output

11
Alternative Scenarios
Evaluate power for scenarios using reasonable low
and high values, 5 and 10 for the mean, 30 and 50
for the standard deviation. Plot power for
sample sizes between 100 and 200. Proc power
onesamplemeans mean 5 10
ntotal 150
stddev 30 50
power . plot xn min100 max200 run
12
Scenario output

13
Graphical display
14
Using Analyst
15
Analyst Scenarios
16
Some PROC Power Options
Proc power onesamplemeans nullmean 2
mean 8 ntotal 150 stddev 40
sides U alpha .01 power . run
17
Some PROC Power Options
18
Detailed List in Online Doc
19
Computational details
20
Computational details
21
Determining Required Sample Size
Two-Sample t Test Comparing two treatments, want
to determine number of patients required to
achieve power of at least 0.9 to detect group
mean difference. a0.05, mean flexibility known
to be about 13, thought to be between 14 and 15
with new treatment. Scenarios for common group
standard deviation, s1.2 or 1.7. Weighting
schemes equal group sizes, twice as many
patients with new treatment, three times as many
patients with new treatment.
22
Two-Sample t Test
• proc power
• twosamplemeans
• groupmeans (13 14) (13 14.5) (13 15)
• stddev 1.2 1.7
• groupweights 1 1 2 3
• power 0.9
• ntotal .
• run

23
Sample Size Scenarios
24
Sample Size Scenario Options
Sample sizes are rounded up to multiples of the
weight sums so that each group size is an
integer. Can request raw fractional sample
sizes with the NFRACTIONAL option. Can specify
differences between the group means instead of
their individual values with the MEANDIFF option
in place of the GROUPMEANS option.

values with the MEANDIFF option in place of the
GROUPMEANS option.
25
Sample Size Scenario Options
proc power twosamplemeans nfractional
meandiff 1 to 2 by 0.5 stddev 1.2 1.7
groupweights 1 1 2 3 power 0.9
ntotal . run
26
New Sample Size Scenarios
27
Plotting Power vs Effect Size
proc power twosamplemeans testdiff
meandiff 0 to 2.5 by 0.5 stddev .5657 1.0
1.4318 power . npergroup 10 plot
xeffect interpoljoin Run
28
Plot of Power vs Effect Size
29
Multiple Regression Example
• Investigating whether homocysteine levels are
linked to plaque buildup in coronary arteries,
• Ordinary least squares regression will 100
• Previously published studies indicate partial
correlation likely to be at least 0.35.

30
MULTREG Specification
proc power multreg model random
nfullpredictors 7 ntestpredictors 1
partialcorr 0.35 ntotal 100 power
. plot xn min50 max150 run
31
MULTREG Power Analysis
32
MULTREG Power Plot
33
Correlation example
• Intent is to demonstrate that partial correlation
between homocysteine levels and plaque buildup is
greater than 0.2.
• Will 100 subjects give adequate statistical
power?

34
ONECORR statement

proc power onecorr distfisherz npvars
6 corr .35 nullcorr 0.2 sides
1 ntotal 100 power . run
35
ONECORR output

36
Correlation sample size determination
• proc power
• onecorr distfisherz
• npvars 6
• corr .35
• nullcorr 0.2
• sides 1
• ntotal .
• power 0.85 0.95
• run

37
Correlation sample size output
38
Sawtooth Power Function
• In analysis of discrete data, such as tests of
proportions, power curve can be non-monotonic.
Actual significance level for discrete tests
strays below the target level, varies with sample
size. Power loss from a decrease in the Type 1
error rate may outweigh the power gain from an
increase in sample size.
• Example scheduling system for airline, determine
how many flights to observe for an 80 chance of
establishing an improvement in the proportion of
late arrivals.

39
Approximate Sample Size for z Test of a
Proportion
Proc power onesamplefreq testz methodnormal
sides 1 alpha 0.05
nullproportion 0.3 proportion 0.2
ntotal . power 0.8 run
40
Approximate Sample Size for z Test of a
Proportion
41
Sample Size for z Test of a Proportion, with
Continuity Correction
methodnormal sides 1 alpha 0.05
nullproportion 0.3 proportion 0.2
ntotal . power 0.8 run
42
Sample Size for z Test of a Proportion with
Continuity Correction
43
Power for exact binomial test
• Proc power plotonly
• onesamplefreq testexact
• sides 1
• alpha 0.05
• nullproportion 0.3
• proportion 0.2
• ntotal 119
• power .
• plot xn min110 max140 step1
• yopts(ref.8) xopts(ref119 129)
• run

44
Power plot, exact binomial test
45
• Proc power plotonly
• ods output plotcontentPlotData
• onesamplefreq testexact
• sides 1
• alpha 0.05
• nullproportion 0.3
• proportion 0.2
• ntotal 119
• power .
• plot xn min110 max140 step1
• yopts(ref.8) xopts(ref119 129)
• run

46
• Proc print dataPlotData
• var NTotal LowerCritVal Alpha Power
• run

47
• Program that generates errors on output
• Proc power
• twosamplemeans meandiff 0 7
• stddev 2 ntotal 2 5 power .
• run

48
• Get table names for ODS output
• ODS trace on
• Proc power
• twosamplemeans meandiff 0 7
• stddev 2 ntotal 2 5 power .
• run
• ODS trace off

49
• Capture output table
• Proc power
• ods output Outputresults
• twosamplemeans meandiff 0 7
• stddev 2 ntotal 2 5 power .
• run

50
Editing the ODS Template
• Proc template
• edit stat.power.commonoutput
• define Info
• printprintInfo
• end
• end
• Run

51
PROC GLMPOWER
• Prospective power analyses for linear models
Type III tests and contrasts of fixed class
effects in univariate linear models, optionally
with covariates that can be continuous or
categorical.
• Specify the design and cell means using an
exemplary data set.
• Specify the model and contrasts using model and
contrast statements as in PROC GLM.

52
PROC GLMPOWER Example
• Effect of light exposure on growth of two
varieties of flowers.
• Conjectures about underlying population means
• Exposure
• Variety 1 2 3
• 1 14 16 21
• 2 10 15 16
• Error standard deviation believed to be about 5
cm.

53
Create Exemplary Data Set
• Data Exemplary
• do Variety 1 to 2
• do Exposure 1 to 3
• input Height _at__at_
• output
• end
• end
• datalines
• 14 16 21
• 10 15 16
• Run

54
PROC GLMPOWER Code
• Proc glmpower dataExemplary
• class Variety Exposure
• model Height Variety Exposure
• power stddev 5
• ntotal 60
• power .
• Run
• Note Balanced design with total of 60 (10 for
each combination of exposure and variety),
default alpha of 0.05. Model could also be
specified
• model Height Variety Exposure
VarietyExposure

55
PROC GLMPOWER Output
56
Power and Sample Size Application
• Interface to power analysis procedures.
• Can store analyses, set new defaults, write
narratives, explore alternative scenarios. SAS
log and code are available. Graphs can be
customized.
• Runs as a web application organized into web
pages Projects page, Analyses page, Preferences
page.

57
PSS Analyses
58
PSS Scenario Input
59
PSS Scenario Output
60
PSS Customizing Graphics
61
PSS Setting Preferences
62
References
SAS 9.1 documentation http//support.sas.com/docu
mentation/onlinedoc/sas9doc.html Castelloe,
John, Power and Sample Size Computations, JSM
2005, presented by Maura Stokes at NESUG 2005,
unpublished. OBrien, Ralph G., and Castelloe,
John M., Sample-Size Analysis in Study Planning
Concepts and Issues, with Examples Using PROC
POWER and PROC GLMPOWER, SUGI 29 Conference
Proceedings, 2004. Bauer, Debbie, and Lavery,
Russell, Proc Power in SAS 9.1, SUGI 29
Conference Proceedings, 2004. Castelloe, John
M., and OBrien, Ralph G., Power and Sample Size
Determination for Linear Models, SUGI 26
Conference Proceedings, 2001.
63
References (cont.)
Muller, Keith E., and Benignus, Vernon A.,
Increasing Scientific Power with Statistical
Power, Neurotoxicology and Teratology, Vol. 14,
pp. 211-219, 1992. Chernick, Michael R., and
Liu, Christine Y., The Saw-Toothed Behavior of
Power Versus Sample Size and Software Solutions
Single Binomial Proportion Using Exact Methods,
The American Statistician, Vol. 56, No. 2,
2002. Lenth, Russell V., Some Practical
Guidelines for Effective Sample Size
Determination, The American Statistician, Vol.
55, No. 3, 2001. Hoenig, John M., and Heisey,
Dennis M., The Abuse of Power The Pervasive
Fallacy of Power Calculations for Data Analysis,
The American Statistician, Vol. 55, No. 1, 2001.
64
References (cont.)
Maxwell, Scott E., Sample Size and Multiple
Regression Analysis, Psychological Methods, Vol.
5, No. 4, 2000. OBrien, Ralph G., and Muller,
Keith E., Unified Power Analysis for t-Tests
Through Multivariate Hypotheses, Applied
Analysis of Variance in Behavioral Science, Lynne
K. Edwards, ed., 1993.