Type : CREATION_INTERNE
Die Daten werden direkt im Skript über einen DATA-Schritt und eine DATALINES-Anweisung erstellt. Die Variable 'velocity' wird gelesen und in eine neue Variable 'v' für die Analyse umgewandelt.
| 1 | title "HPFMM Analysis of Galaxies Data"; |
| 2 | DATA galaxies; |
| 3 | INPUT velocity @code_sas_json/8_SAS_Intro_ReadFile_MultiCol_@@.json; |
| 4 | v = velocity / 1000; |
| 5 | DATALINES; |
| 6 | 9172 9350 9483 9558 9775 10227 10406 16084 16170 18419 |
| 7 | 18552 18600 18927 19052 19070 19330 19343 19349 19440 19473 |
| 8 | 19529 19541 19547 19663 19846 19856 19863 19914 19918 19973 |
| 9 | 19989 20166 20175 20179 20196 20215 20221 20415 20629 20795 |
| 10 | 20821 20846 20875 20986 21137 21492 21701 21814 21921 21960 |
| 11 | 22185 22209 22242 22249 22314 22374 22495 22746 22747 22888 |
| 12 | 22914 23206 23241 23263 23484 23538 23542 23666 23706 23711 |
| 13 | 24129 24285 24289 24366 24717 24990 25633 26960 26995 32065 |
| 14 | 32789 34279 |
| 15 | ; |
| 16 |
| 1 | title2 "Three to Seven Components, Unequal Variances"; |
| 2 | ods graphics on; |
| 3 | PROC HPFMM DATA=galaxies criterion=AIC; |
| 4 | model v = / kmin=3 kmax=7; |
| 5 | ods exclude IterHistory OptInfo ComponentInfo; |
| 6 | RUN; |
| 1 | title2 "Three to Seven Components, Equal Variances"; |
| 2 | PROC HPFMM DATA=galaxies criterion=AIC gconv=0; |
| 3 | model v = / kmin=3 kmax=7 equate=scale; |
| 4 | RUN; |
| 1 | title2 "Five Components, Equal Variances = 0.9025"; |
| 2 | PROC HPFMM DATA=galaxies; |
| 3 | model v = / K=5 equate=scale; |
| 4 | restrict int 0 (scale 1) = 0.9025; |
| 5 | RUN; |
| 6 | ods graphics off; |