Contents: | Purpose / Requirements / Usage / Details / See Also / References |
%inc "<location of your file containing the POWER2x2 macro>";
Following this statement, you may call the %POWER2x2 macro. See this discussion of power analysis in 2x2 tables for an example.
These parameters are required:
This parameter can be specified if the default is not desired:
Either the pair n1= and n2= or the pair nmin= and nmax= must be specified, but not both.
Hypotheses in the test are:
where p1 and p2 are the success probabilities in the two populations. The Pearson chi-square statistic tests the null hypothesis (H0) against the alternative hypothesis (HA) and is available in the FREQ procedure when the CHISQ option is specified in the TABLES statement.
The power is the probability of rejecting H0 and is a function of the true difference in proportions. It is useful to explore the power that results assuming several different settings of the true probabilities. The type 2 error rate (denoted β) is the probability of accepting H0 for some nonzero true difference and is equal to 1-power. The power and β are computed for a range of total sample sizes at a particular alternative hypothesis that you specify.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
Right-click on the link below and select Save to save
the %POWER2x2 macro definition
to a file. It is recommended that you name the file
power2x2.sas
.
Download and save power2x2.sas
Type: | Sample |
Topic: | SAS Reference ==> Procedures ==> FREQ Analytics ==> Nonparametric Analysis Analytics ==> Longitudinal Analysis Analytics ==> Descriptive Statistics Analytics ==> Exact Methods Analytics ==> Categorical Data Analysis |
Date Modified: | 2007-08-14 03:03:07 |
Date Created: | 2005-01-13 15:03:35 |
Product Family | Product | Host | SAS Release | |
Starting | Ending | |||
SAS System | SAS/STAT | All | n/a | n/a |