Download presentation
Presentation is loading. Please wait.
Published byMorris Randall Modified over 9 years ago
1
Proc Power in SAS 9.1
2
Outline Sample size and power calculations Customizing plots of power function ODS Tables
3
Statistical analysis covered in the power procedure 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
4
Syntax PROC POWER ; MULTREG ; ONECORR ; ONESAMPLEFREQ ; ONESAMPLEMEANS ; ONEWAYANOVA ; PAIREDFREQ ; PAIREDMEANS ; TWOSAMPLEFREQ ; TWOSAMPLEMEANS ; TWOSAMPLESURVIVAL ; PLOT ;
5
Twosamplemeans statement Twosamplemeans ; Performing power and sample size analyses for two- independent-sample versions of pooled and unpooled t- tests, equivalence tests and confidence interval precision. : design, data analysis method, variability, type I Error, effect size, power, sample size.
6
Two sample independent mean **missing value identifies a parameter as result parameter; Proc power; twosamplemeans test=diff dist=normal meandiff = 3 3.5 4 stddev= 8 to 9 by 0.5 groupweights = (1 2) power = 0.8 ntotal =.; plot y=power min=0.5 max=0.99;
7
Two-sample t Test for Mean Difference
9
Two sample independent mean Proc power; twosamplemeans meandiff = 3 3.5 4 stddev=8 to 9 by 0.5 groupweights=(1 2) power =. ntotal = 249; plot x=n min=150 max=400; run;
10
Two-sample t Test
12
Twosamplefreq statement Twosamplefreq ; Do power and sample size analyses for tests of two independent proportions. Pearson’s chi-square, Fisher’s exact, and likelihood ratio chi-square tests are supported.
13
Fisher’s Exact Test Proc power; Twosamplefreq test=fisher Proportiondiff = 0.10 to 0.15 by 0.01 Refproportion = 0.20 npergroup=. Power = 0.85; plot y=power min=0.5 max=0.99; Run;
14
Fisher's Exact Conditional Test for Two Proportions
16
Twosamplesurvival Statement Twosamplesurvival ; Power and sample size analyses for comparing two survival curves by the log- rank, Gehan, and Tarone-Ware rank tests.
17
Survival analysis proc power; twosamplesurvival test = logrank groupmedsurtimes = (16 22) accrualtime = 6 totaltime = 18 groupns = 40 | 60 power =. ; run;
18
Log-Rank Test for Two Survival Curves
19
Customizing Plots
20
Adding reference lines Axis Options in Plot statement: XOPTS: specify plot characteristics pertaining to the x-axis. - REF=number-list : specifies locations for reference lines extending from the x-axis across the entire plotting region. -CROSSREF=YES or NO: specifies whether the reference lines defined by REF should be crossed with a reference line on y-axis that indicates the solution point on the curve. YOPTS
21
Adding reference lines *add reference lines to highlight power=0.8 and power=0.9; Proc power plotonly; twosamplemeans meandiff = 3 4 stddev=8 9 power =. ntotal = 100; plot x=n min=20 max=500 yopts=(ref=0.8 0.9); run;
22
plot x=n min=20 max=500 yopts=(ref=0.8 0.9)
23
yopts=(ref=0.8 0.9 crossref=yes)
24
yopts=(ref=0.9) xopts=(ref=100 crossref=yes)
25
Linking plot features to parameters Vary (feature... Feature Specify how plot features should be linked to Varying analysis parameters. Available features are color, linestyle, panel and symbol.
26
Linking plot features to parameters Proc power plotonly; twosamplemeans meandiff = 3 4 stddev=8 9 power = 0.9 ntotal =.; plot y=power min=0.5 max=0.95; run;
27
vary (linestyle by meandiff, symbol by stddev)
28
vary (symbol by meandiff, color by stddev);
29
Choosing Legend Styles using “Key” option Proc power plotonly; twosamplemeans meandiff = 3 4 stddev=8 9 power = 0.9 ntotal =.; plot y=power min=0.5 max=0.95 key = bycurve; run;
30
key = byfeature
31
key = byfeature (pos=inset)
32
key = bycurve
33
key = bycurve (numbers=off pos=inset)
34
key = oncurves
35
ODS Tables
36
ODS tables FixedElements: including all single-value Analysis parameters Output: showing all input and computed analysis parameters, error descriptions PlotContent: data contained in plots including analysis and parameters and indices identifying plot features
37
ODS path names The ODS path names are created as follows. - Power..FixedElements - Power..Output - Power..PlotContent
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.