+ All Categories
Home > Documents > Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power...

Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power...

Date post: 23-Dec-2015
Category:
Upload: morris-randall
View: 224 times
Download: 0 times
Share this document with a friend
37
Proc Power in SAS 9.1
Transcript
Page 1: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Proc Power in SAS 9.1

Page 2: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Outline

• Sample size and power calculations

• Customizing plots of power function

• ODS Tables

Page 3: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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

Page 4: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Syntax

PROC POWER < options > ; MULTREG < options > ; ONECORR < options > ; ONESAMPLEFREQ < options > ; ONESAMPLEMEANS < options > ; ONEWAYANOVA < options > ; PAIREDFREQ < options > ; PAIREDMEANS < options > ; TWOSAMPLEFREQ < options > ; TWOSAMPLEMEANS < options > ; TWOSAMPLESURVIVAL < options > ; PLOT < plot-options > < / graph-options > ;

Page 5: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Twosamplemeans statement

Twosamplemeans <options>; Performing power and sample size analyses for two-

independent-sample versions of pooled and unpooled t-tests, equivalence tests and confidence interval precision.

<options>: design, data analysis method, variability,

type I Error, effect size, power , sample size.

Page 6: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 7: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Two-sample t Test for Mean Difference

Computed N Total

Index Mean

Diff Std Dev

Actual Power

N Total

1 3.0 8.0 0.803 255

2 3.0 8.5 0.803 288

3 3.0 9.0 0.801 321

4 3.5 8.0 0.805 189

5 3.5 8.5 0.805 213

6 3.5 9.0 0.803 237

7 4.0 8.0 0.802 144

8 4.0 8.5 0.801 162

9 4.0 9.0 0.805 183

Fixed Scenario Elements

Distribution Normal

Method Exact

Group 1 Weight 1

Group 2 Weight 2

Nominal Power 0.8

Number of Sides 2

Null Difference 0

Alpha 0.05

Page 8: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.
Page 9: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 10: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Two-sample t Test Fixed Scenario Elements

Distribution Normal

Method Exact

Group 1 Weight 1

Group 2 Weight 2

Total Sample Size 249

Number of Sides 2

Null Difference 0

Alpha 0.05

Computed Power

Index Mean

Diff Std Dev Power

1 3.0 8.0 0.794

2 3.0 8.5 0.744

3 3.0 9.0 0.695

4 3.5 8.0 0.900

5 3.5 8.5 0.862

6 3.5 9.0 0.822

7 4.0 8.0 0.959

8 4.0 8.5 0.937

9 4.0 9.0 0.909

Page 11: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.
Page 12: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Twosamplefreq statement

Twosamplefreq <options>;

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.

Page 13: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 14: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Fisher's Exact Conditional Test for Two Proportions

Fixed Scenario Elements

Distribution Exact conditional

Method Walters normal approximation

Reference (Group 1) Proportion 0.2

Nominal Power 0.85

Number of Sides 2

Alpha 0.05

Computed N Per Group

Index Proportion

Diff Actual Power

N Per Group

1 0.10 0.850 354

2 0.11 0.851 298

3 0.12 0.851 254

4 0.13 0.851 220

5 0.14 0.852 193

6 0.15 0.851 170

Page 15: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.
Page 16: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Twosamplesurvival Statement

Twosamplesurvival <options>;

Power and sample size analyses for comparing two survival curves by the log-rank, Gehan, and Tarone-Ware rank tests.

Page 17: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Survival analysis

proc power; twosamplesurvival test = logrank groupmedsurtimes = (16 22) accrualtime = 6 totaltime = 18 groupns = 40 | 60 power = . ;run;

Page 18: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Log-Rank Test for Two Survival Curves

Fixed Scenario Elements

Method Lakatos normal approximation

Form of Survival Curve 1 Exponential

Form of Survival Curve 2 Exponential

Accrual Time 6

Total Time 18

Group 1 Median Survival Time 16

Group 2 Median Survival Time 22

Group 1 Sample Size 40

Group 2 Sample Size 60

Number of Sides 2

Number of Time Sub-Intervals 12

Group 1 Loss Exponential Hazard 0

Group 2 Loss Exponential Hazard 0

Alpha 0.05

Computed Power

Power

0.178

Page 19: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Customizing Plots

Page 20: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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

Page 21: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 22: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

plot x=n min=20 max=500 yopts=(ref=0.8 0.9)

Page 23: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

yopts=(ref=0.8 0.9 crossref=yes)

Page 24: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

yopts=(ref=0.9) xopts=(ref=100 crossref=yes)

Page 25: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

Linking plot features to parameters

Vary (feature <by parameter-list>... Feature <by parameter-list>

Specify how plot features should be linked to

Varying analysis parameters.

Available features are color, linestyle, panel and symbol.

Page 26: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 27: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

vary (linestyle by meandiff, symbol by stddev)

Page 28: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

vary (symbol by meandiff, color by stddev);

Page 29: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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;

Page 30: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

key = byfeature

Page 31: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

key = byfeature (pos=inset)

Page 32: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

key = bycurve

Page 33: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

key = bycurve (numbers=off pos=inset)

Page 34: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

key = oncurves

Page 35: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

ODS Tables

Page 36: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

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

Page 37: Proc Power in SAS 9.1. Outline Sample size and power calculations Customizing plots of power function ODS Tables.

ODS path names

• The ODS path names are created as follows.

- Power.<analysis statement name>.FixedElements

- Power.<analysis statement name>.Output

- Power.<analysis statement name>.PlotContent


Recommended