1
! @(#)pca.prg 19.1 (ES0-DMD) 02/25/03 13:27:24
2
!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
10
! F. Murtagh, ST-ECF, Garching. Version 1.0; 9 May 1986
14
! Execute PCARIF.EXE and PCACIF.EXE
18
! Principal Components Analysis, Karhunen-Loeve expansion,
19
! Multivariate statistics, Pattern recognition.
23
! @@ PCA Input_table Output_table Analysis_option
24
! Row_or_col._analysis Ncols._Output_table Outable_for_eigenvectors.
30
! Analysis option (3 = PCA of correlation matrix, default; 2 = PCA of
31
! covariance matrix; 1 = PCA of sums of squares and
32
! cross-products matrix).
33
! Row/column analysis (note that all results are detd., but that
34
! output is produced for either rows or columns
35
! (cf. so-called "Q-" or "R-mode" factor analysis).
36
! Number of columns in output table (no. of principal components)
38
! Eigenvectors output table name (defaults to none).
40
!-------------------------------------------------------------------
41
DEFINE/PARAM P1 ? TABLE "Enter input table"
42
DEFINE/PARAM P2 ? TABLE "Enter output table"
43
DEFINE/PARAM P3 3 NUMBER "analysis option" 1,3
44
DEFINE/PARAM P4 R CHAR "analysis mode (R/C)"
45
DEFINE/PARAM P5 3 NUMBER "no. of PC (output table columns)"
46
DEFINE/PARAM P6 NO CHAR "output table with eigenvectors"
48
WRITE/KEYW INPUTI/I/1/1 'P3'
49
WRITE/KEYW RC/C/1/1 'P4'
50
WRITE/KEYW INPUTI/I/2/1 'P5'
51
WRITE/KEYW INPUTC/C/1/8 'P6'
53
IF P4(1:1) .EQ. "C" THEN