您好,欢迎访问三七文档
当前位置:首页 > 商业/管理/HR > 资本运营 > R软件中的主成分分析-DOC
问题表1为某地区农业生态经济系统各区域单元相关指标数据,运用主成分分析方法,用更少的指标信息较为精确地描述该地区农业生态经济的发展状况。表1某农业生态经济系统各区域单元的有关数据样本序号x1:人口密度(人/km2)x2:人均耕地面积(ha)x3:森林覆盖率(%)x4:农民人均纯收入(元/人)x5:人均粮食产量(kg/人)x6:经济作物占农作物播面比例(%)x7:耕地占土地面积比率(%)x8:果园与林地面积之比(%)x9:灌溉田占耕地面积之比(%)1363.9120.35216.101192.11295.3426.72418.4922.23126.2622141.5031.68424.3011752.35452.2632.31414.4641.45527.0663100.6951.06765.6011181.54270.1218.2660.1627.47412.4894143.7391.33633.2051436.12354.2617.48611.8051.89217.5345131.4121.62316.6071405.09586.5940.68314.4010.30322.932668.3372.03276.2041540.29216.398.1284.0650.0114.861795.4160.80171.106926.35291.528.1354.0630.0124.862862.9011.65273.3071501.24225.2518.3522.6450.0343.201986.6240.84168.904897.36196.3716.8615.1760.0556.1671091.3940.81266.502911.24226.5118.2795.6430.0764.4771176.9120.85850.302103.52217.0919.7934.8810.0016.1651251.2741.04164.609968.33181.384.0054.0660.0155.4021368.8310.83662.804957.14194.049.1104.4840.0025.7901477.3010.62360.102824.37188.0919.4095.7215.0558.4131576.9481.02268.0011255.42211.5511.1023.1330.0103.4251699.2650.65460.7021251.03220.914.3834.6150.0115.59317118.5050.66163.3041246.47242.1610.7066.0530.1548.70118141.4730.73754.206814.21193.4611.4196.4420.01212.94519137.7610.59855.9011124.05228.449.5217.8810.06912.65420117.6121.24554.503805.67175.2318.1065.7890.0488.46121122.7810.73149.1021313.11236.2926.7247.1620.09210.078解答:1模型选择x1:人口密度(人/km2)x2:人均耕地面积(ha)x3:森林覆盖率(%)x4:农民人均纯收入(元/人)x5:人均粮食产量(kg/人)x6:经济作物占农作物播面比例(%)x7:耕地占土地面积比率(%)x8:果园与林地面积之比(%)x9:灌溉田占耕地面积之比(%)做主成分分析,命名第一主成分为Z1,第二主成分为Z2,第三主成分为Z3,依次类推,当前m个主成分的累积贡献率达到80%及以上,我们就说脑的大小与前m主成分有关。并求解转化后的iZ与jx之间的相关系数。2问题解答在F盘保存某地区农业生态经济系统各区域单元相关指标数data.txt(见附录)。在R软件中输入代码:得到如下结果:第一主成分的贡献率为51.8%,第二主成分的贡献率为23.2%,第三主成分的贡献率为11.6%。前三个主成分的累积贡献率为86.6%,另六个主成分可舍去。Z1=0.342X1-0.368X2-0.375X4-0.355X5+0.312X6+0.599X7+0.113X8-0.233X9Z2=0.614X2+0.155X4-0.761X5-0.11X6Z3=-0.446X2+0.206X6+0.467X7-0.203X8+0.692X9从第一主成分中,可看出农业生态经济与人均耕地面积,农民人均纯收入,人均粮食产量,灌溉田占耕地面积之比,成反比,即人均耕地面积,农民人均纯收入,人均粮食产量,灌溉田占耕地面积之比越大,生态农业经济越差。做碎石图:建立模型:目标变量:农民人均纯收入(元/人)—y决策变量:x1:人口密度(人/km2)x2:人均耕地面积(ha)x3:森林覆盖率(%)x5:人均粮食产量(kg/人)x6:经济作物占农作物播面比例(%)x7:耕地占土地面积比率(%)x8:果园与林地面积之比(%)x9:灌溉田占耕地面积之比(%)进行多元线性回归分析:y=B0+B1x+B2x2+B3x3+B5x5+B6x6+B7x7+B8x8+B9x9在R软件中输入:得到以下结果y=-1340.879-2.816X1+278.234X2+25.309X3+1.719X5-6.303X6+27.989X7-18.964X8+52.593X9此结果不合理,对其做主成分回归检验:由结果可得前三个主成分贡献率达到94.4%,然后进行主成分分析:在R中建立模型:继续建模:此结果结果符合要求。作图得:所以回归方程为:y=-613.453+382.723X2+12.025X3+2.458X5
本文标题:R软件中的主成分分析-DOC
链接地址:https://www.777doc.com/doc-6091048 .html