数量化2類マクロ 出力例 実験用プログラムを走らせたものです。 次の3つに対応する出力があります。判別分析のグラフィック出力は省略しています。 * (1)基準変数のカテゴリ数が2つの場合----------------------------. hayasi2 ivar=A1 a3 a2 A5/cvar=A4/pscore=yes/missing=NO. * (2)基準変数のカテゴリ数が3つの場合----------------------------. hayasi2 ivar=A1 a3 a2 A4/cvar=A5/ascore=yes/dummy=yes /missing=NO. * (3)判別分析 (2)の結果をふまえての判別分析---------------------. discriminant gropus=a5(1,3)/var=col1 to col7/statistics=all/plot=all. ==================================================================== * (1)基準変数のカテゴリ数が2つの場合----------------------------. hayasi2 ivar=A1 a3 a2 A5/cvar=A4/pscore=yes/missing=NO. ==================================================================== Run MATRIX procedure: COLNAME ****** 数量化2 類 ****** v.0.93 変数追加順と固有値(相関比) total 1 A1 .032468 .032468 A3 .071400 .071400 A2 .323895 .323895 A5 .440110 .440110     カテゴリ数量 freq 1 A1 7.000 -.802 2 8.000 -.206 3 5.000 1.453 A3 11.000 -.283 2 9.000 .346 A2 8.000 -.281 2 4.000 -.759 3 5.000 1.238 4 3.000 -.304 A5 8.000 .537 2 7.000 .128 3 5.000 -1.039 個体数量 group 1 2.0000 -.8278 1.0000 .9098 1.0000 -.2323 2.0000 1.6221 1.0000 -.8510 2.0000 1.5053 1.0000 -.2323 2.0000 .2811 2.0000 .0011 1.0000 -.6091 1.0000 -.1496 2.0000 1.2865 2.0000 -.0136 2.0000 1.3197 1.0000 -.6276 1.0000 -1.8316 1.0000 -.6772 1.0000 -1.1797 2.0000 1.4265 1.0000 -1.1202 COLNAME ****** 第 1 相関比解 ****** 基準変数群別の平均値 平均値 標準偏差 1 -.600 .671 2 .733 .833 相関行列 A1 A3 A2 A5 A4 A1 1.000 -.106 -.402 -.508 .153 A3 -.106 1.000 .143 -.059 .192 A2 -.402 .143 1.000 .314 .415 A5 -.508 -.059 .314 1.000 .261 A4 .153 .192 .415 .261 1.000 偏相関係数 A1 A3 A2 A5 A4 .536 .262 .507 .424 相関比 重相関係数 .440 .663 COLNAME ****** 第 1 相関比解 ****** part 2 COEFFIC 頻度 数量 A1 7.000 -.802 2 8.000 -.206 3 5.000 1.453 範囲 偏相関係数 相関係数 ---> 2.254 .536 .153 COEFFIC 頻度 数量 A3 11.000 -.283 2 9.000 .346 範囲 偏相関係数 相関係数 ---> .629 .262 .192 COEFFIC 頻度 数量 A2 8.000 -.281 2 4.000 -.759 3 5.000 1.238 4 3.000 -.304 範囲 偏相関係数 相関係数 ---> 1.997 .507 .415 COEFFIC 頻度 数量 A5 8.000 .537 2 7.000 .128 3 5.000 -1.039 範囲 偏相関係数 相関係数 ---> 1.576 .424 .261 ------ END MATRIX ----- ======================================================================= * (2)基準変数のカテゴリ数が3つの場合----------------------------. hayasi2 ivar=A1 a3 a2 A4/cvar=A5/ascore=yes/dummy=yes /missing=NO. ======================================================================= Run MATRIX procedure: COLNAME ****** 数量化2 類 ****** v.0.93 変数追加順と固有値(相関比) total 1 2 A1 .284298 .282083 .002216 A3 .462448 .288106 .174342 A2 .543865 .326389 .217476 A4 .660027 .441240 .218787     カテゴリ数量 freq 1 2 A1 7.000 1.031 -.315 2 8.000 -.001 .262 3 5.000 -1.440 .022 A3 11.000 .242 -.770 2 9.000 -.296 .941 A2 8.000 .238 -.421 2 4.000 -.119 -.316 3 5.000 -.237 .802 4 3.000 -.080 .206 A4 11.000 -.563 .059 2 9.000 .688 -.072 COLNAME ****** 第 1 相関比解 ****** 基準変数群別の平均値 平均値 標準偏差 1 .540 .781 2 .183 .828 3 -1.119 .549 相関行列 A1 A3 A2 A4 A5 A1 1.000 -.132 -.178 -.131 .525 A3 -.132 1.000 .158 -.192 .037 A2 -.178 .158 1.000 -.217 -.040 A4 -.131 -.192 -.217 1.000 .268 A5 .525 .037 -.040 .268 1.000 偏相関係数 A1 A3 A2 A4 A5 .627 .224 .167 .463 相関比 重相関係数 .441 .664 COLNAME ****** 第 1 相関比解 ****** part 2 COEFFIC 頻度 数量 A1 7.000 1.031 2 8.000 -.001 3 5.000 -1.440 範囲 偏相関係数 相関係数 ---> 2.471 .627 .525 COEFFIC 頻度 数量 A3 11.000 .242 2 9.000 -.296 範囲 偏相関係数 相関係数 ---> .538 .224 .037 COEFFIC 頻度 数量 A2 8.000 .238 2 4.000 -.119 3 5.000 -.237 4 3.000 -.080 範囲 偏相関係数 相関係数 ---> .475 .167 -.040 COEFFIC 頻度 数量 A4 11.000 -.563 2 9.000 .688 範囲 偏相関係数 相関係数 ---> 1.251 .463 .268 COLNAME ****** 第 2 相関比解 ****** 基準変数群別の平均値 平均値 標準偏差 1 -.429 .919 2 .624 .903 3 -.188 .795 相関行列 A1 A3 A2 A4 A5 A1 1.000 -.173 -.211 .038 -.001 A3 -.173 1.000 .142 -.192 .406 A2 -.211 .142 1.000 -.363 .258 A4 .038 -.192 -.363 1.000 -.128 A5 -.001 .406 .258 -.128 1.000 偏相関係数 A1 A3 A2 A4 A5 .126 .399 .237 .032 相関比 重相関係数 .219 .468 COLNAME ****** 第 2 相関比解 ****** part 2 COEFFIC 頻度 数量 A1 7.000 -.315 2 8.000 .262 3 5.000 .022 範囲 偏相関係数 相関係数 ---> .577 .126 -.001 COEFFIC 頻度 数量 A3 11.000 -.770 2 9.000 .941 範囲 偏相関係数 相関係数 ---> 1.710 .399 .406 COEFFIC 頻度 数量 A2 8.000 -.421 2 4.000 -.316 3 5.000 .802 4 3.000 .206 範囲 偏相関係数 相関係数 ---> 1.223 .237 .258 COEFFIC 頻度 数量 A4 11.000 .059 2 9.000 -.072 範囲 偏相関係数 相関係数 ---> .132 .032 -.128 ------ END MATRIX ----- Map of the result file Result Input1 Input2 ------ ------ ------ H2S1 H2S1 H2S2 H2S2 NUM NUM A1 A1 A2 A2 A3 A3 A4 A4 A5 A5 A6 A6 A7 A7 Map of the result file Result Input1 Input2 Result Input1 Input2 ------ ------ ------ ------ ------ ------ COL1 COL1 NUM NUM COL2 COL2 A1 A1 COL3 COL3 A2 A2 COL4 COL4 A3 A3 COL5 COL5 A4 A4 COL6 COL6 A5 A5 COL7 COL7 A6 A6 H2S1 H2S1 A7 A7 H2S2 H2S2 ======================================================================= * (3)判別分析 (2)の結果をふまえての判別分析---------------------. discriminant gropus=a5(1,3)/var=col1 to col7/statistics=all/plot=all. ======================================================================= Since analysis= was omitted for the first analysis all variables on the variables= list will be entered at level 1. - - - - - - - - - - - - - D I S C R I M I N A N T A N A L Y S I S - - - - - - - - - - - - - On groups defined by A5 マスコミ接触 20 (Unweighted) cases were processed. 0 of these were excluded from the analysis. 20 (Unweighted) cases will be used in the analysis. Number of cases by group Number of cases A5 Unweighted Weighted Label 1 8 8.0 新聞型 2 7 7.0 TV型 3 5 5.0 その他 Total 20 20.0 Group means A5 COL1 COL2 COL3 COL4 COL5 COL6 1 .37500 .12500 .25000 .12500 .25000 .12500 2 .42857 .14286 .71429 .14286 .42857 .14286 3 .40000 .60000 .40000 .40000 .00000 .20000 Total .40000 .25000 .45000 .20000 .25000 .15000 A5 COL7 1 .50000 2 .57143 3 .20000 Total .45000 Group standard deviations A5 COL1 COL2 COL3 COL4 COL5 COL6 1 .51755 .35355 .46291 .35355 .46291 .35355 2 .53452 .37796 .48795 .37796 .53452 .37796 3 .54772 .54772 .54772 .54772 .00000 .44721 Total .50262 .44426 .51042 .41039 .44426 .36635 A5 COL7 1 .53452 2 .53452 3 .44721 Total .51042 Pooled within-groups covariance matrix with 17 degrees of freedom COL1 COL2 COL3 COL4 COL5 COL6 COL1 .2817 COL2 -.1179 .1725 COL3 -.0408 -9.6638655E-03 .2429 COL4 -.0355 .0313 .0139 .1725 COL5 -2.1008403E-03 -.0399 .0210 -.0399 .1891 COL6 -.0120 7.7731092E-03 -.0214 -.0393 -.0399 .1489 COL7 -.0361 .0782 .0437 -.0277 .0756 -.0160 COL7 COL7 .2655 Pooled within-groups correlation matrix COL1 COL2 COL3 COL4 COL5 COL6 COL7 COL1 1.00000 COL2 -.53466 1.00000 COL3 -.15581 -.04722 1.00000 COL4 -.16106 .18149 .06775 1.00000 COL5 -.00910 -.22103 .09804 -.22103 1.00000 COL6 -.05846 .04850 -.11267 -.24510 -.23785 1.00000 COL7 -.13211 .36517 .17207 -.12958 .33753 -.08028 1.00000 Wilks' Lambda (U-statistic) and univariate F-ratio with 2 and 17 degrees of freedom Variable Wilks' Lambda F Significance -------- ------------- ------------- ------------ COL1 .99777 .0190 .9812 COL2 .78190 2.3709 .1235 COL3 .83405 1.6912 .2139 COL4 .91629 .7765 .4757 COL5 .85714 1.4167 .2697 COL6 .99300 .0599 .9420 COL7 .91198 .8204 .4569 Covariance matrix for group 1, 新聞型 COL1 COL2 COL3 COL4 COL5 COL6 COL1 .2679 COL2 -.0536 .1250 COL3 -.1071 -.0357 .2143 COL4 -.0536 -.0179 .1071 .1250 COL5 .0357 -.0357 .0714 -.0357 .2143 COL6 -.0536 -.0179 -.0357 -.0179 -.0357 .1250 COL7 -.0714 .0714 .0000 -.0714 .1429 -.0714 COL7 COL7 .2857 Covariance matrix for group 2, TV型 COL1 COL2 COL3 COL4 COL5 COL6 COL1 .2857 COL2 -.0714 .1429 COL3 -.0238 .0476 .2381 COL4 .0952 -.0238 -.1190 .1429 COL5 -.0476 -.0714 -.0238 -.0714 .2857 COL6 -.0714 .1429 .0476 -.0238 -.0714 .1429 COL7 .0476 .0714 .0238 -.0952 .0476 .0714 COL7 COL7 .2857 Covariance matrix for group 3, その他 COL1 COL2 COL3 COL4 COL5 COL6 COL1 .3000 COL2 -.3000 .3000 COL3 .0500 -.0500 .3000 COL4 -.2000 .2000 .0500 .3000 COL5 .0000 .0000 .0000 .0000 .0000 COL6 .1500 -.1500 -.1000 -.1000 .0000 .2000 COL7 -.1000 .1000 .1500 .1500 .0000 -.0500 COL7 COL7 .2000 Total covariance matrix with 19 degrees of freedom COL1 COL2 COL3 COL4 COL5 COL6 COL1 .2526 COL2 -.1053 .1974 COL3 -.0316 -.0132 .2605 COL4 -.0316 .0526 .0105 .1684 COL5 .0000 -.0658 .0395 -.0526 .1974 COL6 -.0105 .0132 -.0184 -.0316 -.0395 .1342 COL7 -.0316 .0395 .0500 -.0421 .0921 -.0184 COL7 COL7 .2605 - - - - - - - - - - - - - D I S C R I M I N A N T A N A L Y S I S - - - - - - - - - - - - - On groups defined by A5 マスコミ接触 Analysis number 1 Direct method: all variables passing the tolerance test are entered. Minimum tolerance level.................. .00100 Canonical Discriminant Functions Maximum number of functions.............. 2 Minimum cumulative percent of variance... 100.00 Maximum significance of Wilks' Lambda.... 1.0000 Prior probability for each group is .33333 Classification function coefficients (Fisher's linear discriminant functions) A5 = 1 2 3 新聞型 TV型 その他 COL1 3.0603259 4.2822572 5.8155664 COL2 2.4363779 4.1638263 8.7596472 COL3 1.3478469 3.5998886 3.1544480 COL4 2.0407471 2.3544433 2.9673960 COL5 2.2251496 3.8837121 3.7431582 COL6 2.4027960 3.2930148 3.3669347 COL7 1.0843581 .2545469 -2.1063213 (Constant) -2.8201326 -4.9076711 -6.2400499 Canonical Discriminant Functions Pct of Cum Canonical After Wilks' Fcn Eigenvalue Variance Pct Corr Fcn Lambda Chi-square df Sig : 0 .436511 11.605 14 .6380 1* .7897 73.82 73.82 .6643 : 1 .781213 3.457 6 .7497 2* .2801 26.18 100.00 .4677 : * Marks the 2 canonical discriminant functions remaining in the analysis. Standardized canonical discriminant function coefficients Func 1 Func 2 COL1 .67560 .31973 COL2 1.26575 .14594 COL3 .32729 .87922 COL4 .18254 .04546 COL5 .25459 .55454 COL6 .15092 .25231 COL7 -.79502 -.07072 Structure matrix: Pooled within-groups correlations between discriminating variables and canonical discriminant functions (Variables ordered by size of correlation within function) Func 1 Func 2 COL2 .58293* -.19444 COL4 .33536* -.09523 COL7 -.31558* .25264 COL6 .09447* .00427 COL3 .04577 .83936* COL5 -.34383 .51164* COL1 .01235 .08693* * denotes largest absolute correlation between each variable and any discriminant function. Unstandardized canonical discriminant function coefficients Func 1 Func 2 COL1 1.2728619 .6023876 COL2 3.0477539 .3513998 COL3 .6641308 1.7841019 COL4 .4395212 .1094668 COL5 .5855049 1.2753141 COL6 .3910499 .6537457 COL7 -1.5427935 -.1372461 (Constant) -1.1686229 -1.5086738 Canonical discriminant functions evaluated at group means (group centroids) Group Func 1 Func 2 1 -.66550 -.44722 2 -.22535 .65122 3 1.38029 -.19615 Test of Equality of Group Covariance Matrices Using Box's M The ranks and natural logarithms of determinants printed are those of the group covariance matrices. Group Label Rank Log Determinant 1 新聞型 6 (Singular) 2 TV型 < 7 (Too few cases to be non-singular) 3 その他 < 5 (Too few cases to be non-singular) Pooled within-groups covariance matrix 7 -12.318644 No test can be performed without at least two non-singular group covariance matrices. Symbols used in territorial map Symbol Group Label ------ ----- -------------------- 1 1 新聞型 2 2 TV型 3 3 その他 * Group centroids Territorial Map * indicates a group centroid Canonical Discriminant Function 1 -8.0 -6.0 -4.0 -2.0 .0 2.0 4.0 6.0 8.0  C 8.0  23  a  23  n  23  o  23  n  23  i  23  c 6.0       23   a  23  l  23   23  D  23  i  23  s 4.0       23    c  23  r 2 23  i 12222 23  m  11112222 23  i  11112222 23  n 2.0  11112222    23    a  11112222 23  n  11112222 23  t  111122222 23   111112222 * 23  F  11112222 23  u .0     11112222 23     n  *111123 *  c  13  t  13  i  13  o  13  n -2.0      13      13  2  13   13   13   13  -4.0      13      13   13   13   13   13  -6.0      13      13   13   13   13   13  -8.0  13   -8.0 -6.0 -4.0 -2.0 .0 2.0 4.0 6.0 8.0 Case Mis Actual Highest Probability 2nd Highest Discriminant Number Val Sel Group Group P(D/G) P(G/D) Group P(G/D) Scores... 1 1 1 .0601 .9475 2 .0512 -2.7114 -1.6459 2 2 2 .6367 .7643 1 .1235 .0810 1.5507 3 1 1 .6692 .5167 3 .2658 .1042 -.9063 4 2 ** 3 .4077 .5983 2 .3518 1.3915 1.1433 5 1 1 .9145 .7206 2 .2176 -.7776 -.8549 6 2 2 .3938 .8523 1 .0930 -.1889 2.0159 7 1 1 .6692 .5167 3 .2658 .1042 -.9063 8 2 ** 1 .3432 .7751 2 .2201 -2.1259 -.3706 9 3 3 .7276 .6995 2 .2399 1.4400 .5990 10 2 2 .8962 .4957 1 .4205 -.5045 .2754 11 3 3 .5564 .9148 1 .0502 1.8791 -1.1573 12 1 1 .7803 .4853 2 .4678 -.8530 .2318 13 2 2 .8566 .6072 1 .3480 -.7744 .7406 14 1 ** 2 .3482 .7224 1 .2676 -1.4618 1.4135 15 3 3 .4480 .9593 1 .0208 2.3187 -1.0478 16 3 3 .6749 .3999 2 .3038 .4953 -.2525 17 1 ** 2 .9528 .5176 1 .3209 -.0650 .3849 18 3 ** 2 .5949 .4919 3 .3852 .7684 .8778 19 1 1 .4228 .4867 3 .3652 .3363 -1.2945 20 2 ** 3 .5884 .4519 1 .3478 .5438 -.7968 Hi-Res Chart # 4:全グループの散布図 Hi-Res Chart # 1:新聞型の散布図 Hi-Res Chart # 2:TV型の散布図 Hi-Res Chart # 3:その他の散布図 Classification results - No. of Predicted Group Membership Actual Group Cases 1 2 3 -------------------- ------ -------- -------- -------- Group 1 8 6 2 0 新聞型 75.0% 25.0% .0% Group 2 7 1 4 2 TV型 14.3% 57.1% 28.6% Group 3 5 0 1 4 その他 .0% 20.0% 80.0% Percent of "grouped" cases correctly classified: 70.00% Classification processing summary 20 (Unweighted) cases were processed. 0 cases were excluded for missing or out-of-range group codes. 0 cases had at least one missing discriminating variable. 20 (Unweighted) cases were used for printed output.