Bonjour,
Je souhaiterai savoir quel test SAS réalise lors d'une proc freq avec l'option binomial.
Il semble qu'il s'agisse du test de Wald :Toutefois si l'on compare les résultats avec R il semblerait que ça soit un test de Wilson.The BINOMIAL option also produces an asymptotic Wald test that the proportion equals 0.5.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35 /* SAS */ data ACT; do i=1 to 48; ACTIVE="0"; output; end; do i=1 to 1; ACTIVE="1"; output; end; run; /* bilatéral à 10% <=> unilatéral 5% */ proc freq data=ACT; tables ACTIVE / binomial(all level="0" p=.9) alpha=0.1; run; /* Résultats */ Binomial Proportion ACTIVE = 0 Proportion 0.9796 ASE 0.0202 Confidence Limits for the Binomial Proportion Proportion = 0.9796 Type 90% Confidence Limits Agresti-Coull 0.9068 1.0000 Clopper-Pearson (Exact) 0.9068 0.9990 Jeffreys 0.9230 0.9964 Wald 0.9464 1.0000 Wilson 0.9136 0.9954 Test of H0: Proportion = 0.9 ASE under H0 0.0429 Z 1.8571 One-sided Pr > Z 0.0316 Two-sided Pr > |Z| 0.0633Les IC de la fonction prop.test de R correspondent aux IC du test de Wilson sous SAS.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 /* R #bilatéral à 10% <=> unilatéral 5%*/ prop.test(48,49,0.9,"two.sided",0.90, correct=F) #Test Khi 2, Wilson IC? 1-sample proportions test without continuity correction data: 48 out of 49, null probability 0.9 X-squared = 3.449, df = 1, p-value = 0.06329 alternative hypothesis: true p is not equal to 0.9 90 percent confidence interval: 0.9135596 0.9954339 sample estimates: p 0.9795918 prop.test(48,49,0.9,"greater",0.95, correct=F) #Test Khi 2, Wilson IC? 1-sample proportions test without continuity correction data: 48 out of 49, null probability 0.9 X-squared = 3.449, df = 1, p-value = 0.03165 alternative hypothesis: true p is greater than 0.9 95 percent confidence interval: 0.9135596 1.0000000 sample estimates: p 0.9795918
Si on fait un test Binomiale sous RLes résultats coïncident avec les résultats de l'IC de Clopper Pearson.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #bilatéral à 10% <=> unilatéral 5% binom.test(48,49,0.9,"two.sided",0.90) Exact binomial test data: 48 and 49 number of successes = 48, number of trials = 49, p-value = 0.08877 alternative hypothesis: true probability of success is not equal to 0.9 90 percent confidence interval: 0.9068075 0.9989537 sample estimates: probability of success 0.9795918 binom.test(48,49,0.9,"greater",0.95) #Clopper Pearson IC Exact binomial test data: 48 and 49 number of successes = 48, number of trials = 49, p-value = 0.0369 alternative hypothesis: true probability of success is greater than 0.9 95 percent confidence interval: 0.9068075 1.0000000 sample estimates: probability of success 0.9795918
De plus si le test de SAS est un test de Wald, pour un risque alpha à 5% on retrouve des résultats contradictoires :
P-valeur de 0,06 (non significative) alors que l'IC de Wald [0.94 ; 1.00] est significatif.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 /* bilatéral à 5% */ proc freq data=ACT; tables ACTIVE / binomial(all level="0" p=.9) alpha=0.05; run; /* Résultats */ Confidence Limits for the Binomial Proportion Proportion = 0.9796 Type 95% Confidence Limits Agresti-Coull 0.8831 1.0000 Clopper-Pearson (Exact) 0.8915 0.9995 Jeffreys 0.9086 0.9978 Wald 0.9400 1.0000 Wilson 0.8931 0.9964 Test of H0: Proportion = 0.9 ASE under H0 0.0429 Z 1.8571 One-sided Pr > Z 0.0316 Two-sided Pr > |Z| 0.0633
Pouvez-vous m'éclairer sur le test réalisé par SAS ?
Merci par avance.
Partager