《sas主成分分析.docx》由会员分享,可在线阅读,更多相关《sas主成分分析.docx(13页珍藏版)》请在第一文库网上搜索。
1、sas主成分分析sas主成分分析第七章主成分分析实验目的:熟悉并掌握主成分分析和因子分析的原理和在变量分类、综合评价、主成分回归等几个方面的应用,以及相应的SAS程序实现。实验内容:对我国钢铁行业上市公司的财务绩效状况进行主成分分析,选择的财务指标共有以下几个:流动比率,速动比率,存货周转率,总资产周转率,净资产收益率,经营净利率,每股收益,净资产收益率增长率,股东权益增长率。数据如下:完成以下工作:(1)选取累积贡献率85%的前几个主成分,分别计算得分;并对选取的主成分进行解释;(2)对各上市公司的财务绩效进行综合评价;(3)利用选取的主成分得分,借助聚类分析过程对钢铁行业上市公司进行分类。
2、datazcf;inputname$x1-x9;cards;邯郸钢铁1.5510.9717.1650.88910.7689.2680.451-16.0246.122武钢股份2.1921.828.0880.97515.05411.1140.336-3.0392.588钢联股份1.2860.9418.0441.1247.3894.5990.205-59.988122.041宝钢股份0.9790.5718.130.6019.7428.780.205-17.6853.989莱钢股份1.3640.4975.0780.9314.1039.1370.523-24.26114.16西宁特钢1.4330.672
3、1.4620.4716.4297.2680.1559.3493.027杭钢股份2.1081.4988.3731.41816.7567.9370.531-18.72513.662邢台轧辐2.11.5951.8830.3966.4848.9810.1325.275-1.061宁夏恒力1.3641.0641.8680.2787.46919.8420.201-35.19455.428凌钢股份1.7721.0617.8411.11912.8838.8040.5285.34310.107南钢股份1.8181.3928.8661.54612.8855.1530.409-7.0286.131酒钢宏兴1.441
4、0.88410.1681.07112.8317.8250.36744.0376.686抚顺特钢0.9550.6523.4160.5097.1476.8510.193-8.0741.93安阳钢铁1.8931.3335.1070.9810.9497.9150.3500上海科技1.3131.1824.6430.5689.5499.4230.19935.6353.582沪昌特钢10,8139.536.5850.5671.1031.6560.01915.031-7.171山川股份1.2520.5851.4850.45110.34414.6930.209-1.6159.799浦东不锈6.1865.1212
5、.3630.2650.7542.5130.013-45.439-1.176新华股份1.8171.3143.2910.7469.9249.0280.137-3.5771.985工益股份1.8091.2674.0460.8280.6950.450.011104.419-4.714马钢股份1.5841.0694.3180.5692.0032.1830.03235.279-12.487宝信软件3.5943.2015.0140.82114.669.7210.147126.91123.243北特钢1.3851.0922.6910.467-11.21-7.917-0.14853.839-11.058广钢股份
6、0.8590.513.8840.7224.2472.6850.096-32.409-4.004;procprincompn=9out=prin;varX1-9;run;procprintdata=prin;varprin1-prin9;run;主要输出结果:相关阵的特征值和特征向量Eigenva1ueDifferenceProportionCumuIative13.626730451.710877240.40300.403021. 915853210.519337180.21290.615831. 396516020.349008540.15520.771041. 047507480.3710
7、47740.11640.887450. 676459740.478913290.07520.962660. 197546440.106501190.02190.984570.091045260.044878480.01010.994680.046166770.043992140.00510.999890.002174630.00021.0000EigenvectorsPrin1Prin2Prin3Prin4Prin5Prin6Prin7Prin8Prin9x1-.2632570.5528190.3251720.0999320.0123340.1292890.077190-.0215500.69
8、7189x2-.2696730.5512290.3176490.0909930.0600930.065411-.0196680.049407-709595x30.3207430.454750-.227474-1958410.013020-.7729000.0382700.0086860.033825x40.3790330.331485-.342911-.1840840.0144020.490904-.3231210.4986720.026498x50.4608530.1052280.1235360.3670920.0903870.094185-.486791-.610331-.003691x6
9、0.308953-.1918380.4762280.4505290.202663-.228562-.0285870.5848690.042126x70.4802260.1255120.0219100.155827-.2454280.2558630.762567-.122168-082054x8-1693840.077314-.5106640.4440140.6759650.0353110.220767-.0214310.005659x90.210440-.0652010.347445-.5918860.6553280.1132300.140544-.1355950.001607由输出特征值可知
10、,第一主成分的贡献率为40.30%,第二个主成分的.贡献率为61.58%,第三个主成分的贡献率为77.10%,前四个主成分累计贡献率为88.74%o因此只需前三个主成分就更很好的概括这组数据。且第一主成分,第二主成分,第三主成分,第四主成分为:Z1=-O.263257x1-0.269673x2+0.320743x3+0.379033x4+0.460853x5+0.308953x6+0.480226x7-0.169384x8+0.210440x9,Z2=0.552819x1+0.551229x2+454750x3+331485x4+0.105228x5-0.191838x6+0.125512x7
11、+0.077314x8-0.065201x9,Z3=0.325172x1+0.317649x2-0.227474x3-0.342911x4+0.123536x50.476228x6+0.021910x7-0.510664x8+0.347445x9,Z4=0.099932x1+0.090993x2-0.195841x3-0.184084x4+0.367092x5+0.450529x6+0.155827x7+0.444014x8-0.591886x9,datapingjia;setprin;y=0.4030*prin1+0.2129*prin2+0.1552*prin3+0.1164*prin4+
12、0.0752*prin5+0.0219*prin6+0.0101*prin7+0.0051rin8+0.0002*prin9;run;procsortdata=pingjia;byy;run;procprint;varnameyx1-9;TitIe上市公司经济效益综合评价;run;上市公司经济效益综合评价0bsnameyx1x2x3x4x5x6x7x8x91北特钢-2.389471.3851.0922.6910.467-11.210-7.917-0.14853.839-11.0582工益股份-1.046711.8091.2674.0460.8280.6950.4500.011104.419-4
13、.7143马钢股份-1. 002091.5841.0694.3180.5692.0032.1830.03235.279-12.4874 浦东不锈-0.906476.1865.1212.3630.2650.7542.5130.013-45.439-1.1765 广钢股份-0.727400.8590.5103.8840.7224.2472.6850.096-32.409-4.0046西宁特钢-0.590661.4330.6721.4620.4716.4297.2680.1559.3493.0277邢台轧辐-0.511122.1001.5951.8830.3966.4848.9810.1325.27
14、5-1.0618抚顺特钢-0.409600.9550.6523.4160.5097.1476.8510.193-8.0741.9309沪昌特钢-0.2543810.8139.5306.5850.5671.1031.6560.01915.031-7.17110新华股份-0.1102O18171.3143.2910.7469.9249.0280.137-3.5771.98511上海科技-0.076281.3131.1824.6430.5689.5499.4230.19935.6353.58212山川股份-0.022531.2520.5851.4850.45110.34414.6930.209-1.
15、6159.79913 宝钢股份0.126760.9790.5718.1300.6019.7428.7800.205-17.6853.98914 宁夏恒力0.222151.3641.0641.8680.2787.46919.8420.201-35.19455.42815安阳钢铁0.372151.8931.3335.1070.98010.9497.9150.3500.0000.00016宝信软件0.417683.5943.2015.0140.82114.6609.7210.147126.91123.24317 钢联股份0.609341.2860.9418.0441.1247.3894.5990.205-59.988122.04118 邯郸钢铁0.634861.5510.9717.1650.88910.7689.2680.451-16.0246.12219酒钢宏兴0.773531.4410.88410.1681.07112.8317.8250.36744.0376.68620 莱钢股份0.778831.3640.4975.0780.93014.1039.1370.523-24.26114.16021 武钢股份0.878492.192