# SAS Power and Sample Size Analysis Procedures

Placement-ready Courses: Enroll Now, Thank us Later!

We looked at different types of analysis and the procedures used for performing it in the previous STAT tutorials, today we will learn about SAS power and sample size analysis. Moreover, we will also discuss how can we use power and sample size procedures in SAS/STAT:Â PROC GLMPOWER &Â PROCÂ POWER with examples and syntax.

So, let’s start with SAS/STAT Power and Sample Size Analysis.

### SAS Power and Sample Size Analysis

The most important aspect of any study is determining the appropriate sample size to answer the research question.Â We can improve the resource usage and design of a study through SAS Power and sample size analysis, thereby improving chances of obtaining results that exhibit maximum efficiency. In any generic statistical testing procedure, the motive is to assume that Type I errors are more costly than Type II errors.

SAS/STAT Power and sample size analysis helps you achieve the desired balance between the Type I and Type II errors. With the most efficient designs and sample sizes, you can improve your chances of detecting effects that might otherwise have been ignored. This will save money, time and perhaps minimizes the risks to subjects.

### Procedures for Power and Sample Size Analysis in SAS/STAT

Following procedures are used to compute SAS power and sample size analysis of a sample data. Let us explore it.

#### a. PROC POWER

The PROC POWER procedure performs SAS power and sample analysis, which covers a variety of sample analysis such as t-tests, one way ANOVA, regression and correlation. This procedure also performs different tasks such as determining the sample size required to get an appropriate result with adequate probability (power).

It characterizes the power of a study to extract meaning from it and it also conducts an analysis to assess the effect of a required sample size to other factors.

The PROC POWER procedure uses the following inputs

• Significance level (alpha)
• Statistical model and test
• Design
• Surmised effects and variability
• Power
• Sample size

A Syntax of PROC POWER –

```PROC POWER <options>;
<analysis statements>;```

TheÂ PROC POWER and minimum one analysis statements are required. Different analysis statements can be specified depending on the type of analysis we wish to perform such as:
COXREG,Â CUSTOM,Â LOGISTIC,Â MULTREG,Â ONECORR,Â ONESAMPLEFREQ,Â ONESAMPLEMEANS,Â ONEWAYANOVA,Â PAIREDFREQ,Â PAIREDMEANS,Â TWOSAMPLEFREQ,Â TWOSAMPLEMEANS,Â TWOSAMPLESURVIVAL, andÂ TWOSAMPLEWILCOXON.

PROC POWERÂ Example-

```proc power;
Â Â  onewayanova test=overall
Â Â Â Â  groupmeans=0.5|0
Â Â Â Â  stddev=1
Â Â Â Â  ntotal=6
Â Â Â Â  power=.;
Â Â Â Â  plot x=n min=6 max=27;
run;```

SAS PROCÂ POWER

SAS/STAT Power and Sample Size Analysis – PROCÂ POWER

#### b. PROC GLMPOWER

The GLMPOWER procedure in SAS/STAT performs power and sample size analysis for linear models. Just like the PROC POWER, this procedure also performs different tasks such as determining the sample size required to get an appropriate result with adequate probability (power).

It characterizes the power of a study to extract meaning from it and it also conducts an analysis to assess the effect of a required sample size to other factors.
A Syntax of PROC GLMPOWER-

```PROCGLMPOWERÂ DATASET;
MODEL DEPENDENT variables =independent effects;
POWER <options>;```

TheÂ PROC GLMPOWER,Â MODEL, and POWER statements are required.
PROC GLMPOWER Example-

```proc GLMPOWER DATA=sashelp.cars;
Â Â  model mpg_highway=enginesize|horsepower;
Â Â Â Â  power
Â Â Â Â Â  stddev = 5
Â Â Â Â Â  ntotal = 60
Â Â Â Â Â  powerÂ  = .;
run;```

SAS PROC GLMPOWER

This was allÂ about SAS Power and Sample Size Analysis Tutorial. Hope you like our explanation.

### Conclusion

Hence, in this SAS/STAT tutorial, we studied about SAS/STAT Power and Sample Size Analysis. In conclusion, we saw the procedures used for power and sample size analysis in SAS/STAT: PROC GLMPOWER and PROC POWER with example and syntax.Â Furthermore, if you have any doubt, feel free to ask in the comment section.

Did you like this article? If Yes, please give DataFlair 5 Stars on Google