Power Calculation

This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post.

Example of finding power of a balanced one way ANOVA:
proc power;
        onewayanova test = overall
        groupmeans = 59 | 66 | 42
        std = 5 8 10 12
        npergroup = 3 4 5 6 7 8 9 10
        power = . ;
        plot ;
run;

Contrast power:
proc power;
        onewayanova test = contrast
        contrast = (1 -1 0 0 0 0) (0 1 0 0 -1 0) (0 0 1 -1 0 0)
        groupmeans = (5 4 6 11 12 9)
        std = 4
        npergroup = 5
        power = .
        ;
run;

Example of finding n of an unbalanced one way ANOVA:
proc power;
        onewayanova test = overall
        groupmeans = 3 | 7 | 8
        stddev = 4
        groupweights = (1 2 2)
        npergroup = .
        power = 0.8
        ;
run;

Example of finding power of a chi-squared test:
proc power;
        twosamplefreq test = pchi
        groupproportions = (.6 .4) (.7 .3) (.55 .45) (.49 .51)
        nullproportiondiff = 40
        npergroup =25 50 75 100 200
        power = . ;
        plot;
run;

Click Here

This post was kindly contributed by SAS & Statistics - go there to comment and to read the full post.