powerlog Power for logistic regression, quantitative predictor powerlog

Visualizing Categorical Data: powerlog

$Version: 1.0 (17 Apr 1998)
Michael Friendly
York University

The powerlog macro ( [download] get powerlog.sas)

Power for logistic regression, quantitative predictor

The POWERLOG macro calculates sample size required to achived given power values for a logistic regression model with one or more quantitative predictors. Results are displayed as a table of sample sizes required for a range of power values, and as a graph.

Usage

The POWERLOG macro is called with keyword parameters. The arguments may be listed within parentheses in any order, separated by commas. You must supply either an input data set containing the variables P1, P2, ALPHA, POWER, and RSQ (one observation for each combination for which power is desired), or the macro parameters P1= and P2=. For example:

  %powerlog(p1=.08, p2=%str(.16, .24));

Parameters

DATA=
Specifies the name of an input data set containing the variables P1, P2, ALPHA, POWER, and RSQ in all combinations for which power is desired. If an input DATA= data set is specified, the program ignores values for the P1=, P2=, ALPHA=, POWER=, and RSQ= parameters.
P1=
is the estimated probability of the event at the mean value of the quantitative predictor.
P2=
is the estimated probability of the event at an X-value equal to the X-mean plus one standard deviation. You may specify a list of values separated by commas, a range of the form x TO y BY z, or a combination of these. However, you must surround the P2= value with %STR() if any commas appear in it. For example,

        p2=.10 to .30 by .05
        p2=%str(.10, .13, .20)
ALPHA=
is the desired Type I error probability for a *one-sided* test of H0: beta(x) = 0
POWER=
is the desired power of the test.
RSQ=
is the squared multiple correlation of the predictor with all other predictors. Use RSQ=0 for a 1-predictor model.
PLOT=
is a specification for plotting the results. The default is PLOT=N * POWER=RSQ. No plots are produced if PLOT= is blank.
PLOTBY=
is another variable in the OUT= data set. A separate plot is produced for each level of the PLOTBY variable. The default is THETA, the odds-ratio determined by the values of P1 and P2.
OUT=
Specifies the name of the output data set.

Examples

See also

powerrxc Power for ChiSquare test of independence
power2x2 Power for 2 x 2 tables