Type : CREATION_INTERNE
Data is manually created via the DATALINES statement in the first DATA step.
| 1 | DATA cash; |
| 2 | INPUT School Money; |
| 3 | |
| 4 | DATALINES; |
| 5 | 0 34 |
| 6 | 0 1200 |
| 7 | 0 23 |
| 8 | 0 50 |
| 9 | 0 60 |
| 10 | 0 50 |
| 11 | 0 0 |
| 12 | 0 0 |
| 13 | 0 30 |
| 14 | 0 89 |
| 15 | 0 0 |
| 16 | 0 300 |
| 17 | 0 400 |
| 18 | 0 20 |
| 19 | 0 10 |
| 20 | 0 0 |
| 21 | 1 20 |
| 22 | 1 10 |
| 23 | 1 5 |
| 24 | 1 0 |
| 25 | 1 30 |
| 26 | 1 50 |
| 27 | 1 0 |
| 28 | 1 100 |
| 29 | 1 110 |
| 30 | 1 0 |
| 31 | 1 40 |
| 32 | 1 10 |
| 33 | 1 3 |
| 34 | 1 0 |
| 35 | ; |
| 1 | PROC TTEST DATA=cash; |
| 2 | class School; |
| 3 | *may need to convert School to numeric; |
| 4 | var Money; |
| 5 | RUN; |
| 1 | ods OUTPUT off; |
| 2 | ods exclude all; |
| 3 | |
| 4 | PROC IML ; |
| 5 | use cash; |
| 6 | read all var{School Money} into x; |
| 7 | p=t(ranperm(x[, 2], 1000)); |
| 8 | paf=x[, 1]||p; |
| 9 | create newds from paf; |
| 10 | append from paf; |
| 11 | QUIT; |
| 1 | ods OUTPUT conflimits=diff; |
| 2 | |
| 3 | PROC TTEST DATA=newds plots=none; |
| 4 | class col1; |
| 5 | var col2 - col1001; |
| 6 | RUN; |
| 7 | |
| 8 | ods OUTPUT on; |
| 9 | ods exclude none; |
| 1 | PROC UNIVARIATE DATA=diff; |
| 2 | where method="Pooled"; |
| 3 | var mean; |
| 4 | histogram mean; |
| 5 | RUN; |
| 1 | DATA numdiffs; |
| 2 | SET diff; |
| 3 | where method="Pooled"; |
| 4 | |
| 5 | IF abs(mean) >=114.6; |
| 6 | RUN; |
| 7 | |
| 8 | PROC PRINT DATA=numdiffs; |
| 9 | where method="Pooled"; |
| 10 | RUN; |