|
6#

楼主 |
发表于 2006-5-10 02:23:20
|
只看该作者
use proc freq, binomial
proc freq;
weight Count;
tables Eyes / binomial alpha=.1;
tables Hair / binomial(p=.28);
run;
The BINOMIAL option computes the binomial proportion and confidence limits, and it tests the hypothesis that the proportion for the first eye color level (brown) is 0.5.
You can get 95% CI by using alpha=.05, this is the default.
The option ALPHA=.1 specifies that 90% confidence limits should be computed.
The output will be like this:
Test of H0: Proportion = 0.5
ASE under H0 0.0181
Z -2.8981
One-sided Pr < Z 0.0019
Two-sided Pr > |Z| 0.0038
IF YOU WANT TO CHANGE THE HO: proportion=.28, you can use
tables Hair / binomial(p=.28);
Good Luck. |
|