您好,欢迎访问三七文档
《金融数据挖掘与应用》课程作业1基于GLM(广义线性模型)的数据分析SAS里的GLM应用在实际中比较广泛,对数据的分析具有比较强的普适性。趋势面回归分析(TrendAnalysis)是以多元回归分析为理论基础的一种预测与统计技术。它用空间坐标法进行多项式回归,从中估计出最佳的回归模型,因此也被称为趋势面分析,当不知道手中的数据呈线性还是非线性相关时,可以采用趋势面数据分析方法,以便找出拟合数据的最佳统计预测模型。本文运用GLM对一定的数据进行GLM分析。一、数据与要求此处选取15名吧不同程度的烟民的每日饮酒(啤酒)量与心电图指标(zb)的对应数据。然后设法建立zb与日抽烟量(X)/支和日饮酒量(y)/升之间的关系。序号组别日抽烟量(x)/支日饮酒量(y)/升心电图指标(zb)113010280212511260313513330414014400514514410622012270721811210822512280922513300102231329011340144101234515420133481642514350184501535519470二、运用GLM过程进行趋势面分析1.趋势分析的GLM程序databeer;inputobsnxyzb;cards;013010280022511260《金融数据挖掘与应用》课程作业2033513330044014400054514410062012270071811210082512280092513300102313290114014410124515420134816425145018450155519470;procglm;modelzb=xy/p;procglm;modelzb=xyx*xx*yy*y/p;procglm;modelzb=xyx*x*xx*x*yx*y*yy*y*y/p;procglm;modelzb=xyx*x*xx*x*yx*y*yy*y*yx*x*x*xx*x*x*yx*x*y*yx*y*y*yy*y*y*y/p;run;2.四种分析模型结果(1)一阶趋势模型DependentVariable:zb源变量自由度平方和均值F值概率值SumofSourceDFSquaresMeanSquareFValuePrFModel290615.2099345307.60497127.19.0001Error124274.79007356.23251CorrectedTotal1494890.00000R-SquareCoeffVarRootMSEzbMean0.9549505.43922818.87412347.000---------------------------------------------------------------------------------------------------------------------------------SourceDFTypeISSMeanSquareFValuePrFx189541.5655889541.56558251.36.0001y11073.644351073.644353.010.1081---------------------------------------------------------------------------------------------------------------------------------SourceDFTypeIIISSMeanSquareFValuePrF《金融数据挖掘与应用》课程作业3x114652.2435114652.2435141.13.0001y11073.644351073.644353.010.1081---------------------------------------------------------------------------------------------------------------------------------StandardParameterEstimateErrortValuePr|t|Intercept64.0499938033.065399191.940.0766x5.383855650.839475676.41.0001y6.941998693.998720781.740.1081ObservationObservedPredictedResidual1280.0000000294.9856503-14.98565032260.0000000275.0083707-15.00837073330.0000000342.7309246-12.73092464400.0000000376.592201523.40779855410.0000000403.51147986.48852026270.0000000255.031091114.96890897210.0000000237.3213811-27.32138118280.0000000281.9503694-1.95036949300.0000000288.892368111.107631910290.0000000278.124656811.875343211410.0000000376.592201533.407798512420.0000000410.45347859.546521513425.0000000433.5470441-8.547044114450.0000000458.1987528-8.198752815470.0000000492.0600298-22.0600298---------------------------------------------------------------------------------------------------------------------------------SumofResiduals-0.000000SumofSquaredResiduals4274.790069SumofSquaredResiduals-ErrorSS-0.000000FirstOrderAutocorrelation0.235461Durbin-WatsonD1.362704(2)二阶趋势模型DependentVariable:zb源变量自由度平方和均值F值概率值SumofSourceDFSquaresMeanSquareFValuePrFModel593330.8358018666.16716107.75.0001Error91559.16420173.24047CorrectedTotal1494890.00000R-SquareCoeffVarRootMSEzbMean0.9835693.79310813.16208347.0000--------------------------------------------------------------------------------------------------------------------------------《金融数据挖掘与应用》课程作业4SourceDFTypeISSMeanSquareFValuePrFX189541.5655889541.56558516.86.0001y11073.644351073.644356.200.0345x*x11892.866261892.8662610.930.0091x*y1772.91658772.916584.460.0638y*y149.8430349.843030.290.6047SourceDFTypeIIISSMeanSquareFValuePrFx1965.2913631965.29136315.570.0426y1127.4395437127.43954370.740.4133x*x143.662297243.66229720.250.6277x*y1242.0343234242.03432341.400.2675y*y149.843031649.84303160.290.6047StandardParameterEstimateErrortValuePr|t|Intercept-262.7664793109.1074817-2.410.0394x16.06997796.80786202.360.0426y23.539132727.44498670.860.4133x*x0.06387730.12723830.500.6277x*y-1.16510160.9857119-1.180.2675y*y1.16733622.17629820.540.6047---------------------------------------------------------------------------------------------------------------------------------ObservationObservedPredictedResidual1280.0000000279.41687000.58313002260.0000000258.68145961.31854043330.0000000351.0997183-21.09971834400.0000000388.125128211.87487185410.0000000414.0657505-4.06575056270.0000000255.125602414.87439767210.0000000216.6773768-6.67737688280.0000000279.94178340.05821669300.0000000303.5367795-3.536779510290.0000000295.5572467-5.557246711410.0000000388.125128221.874871812420.0000000419.02805850.971941513425.0000000436.4318573-11.431857314450.0000000453.7554706-3.755470615470.0000000465.43176994.5682301---------------------------------------------------------------------------------------------------------------------------------SumofResiduals-0.000000SumofSquaredResiduals1559.164195SumofSquaredResiduals-ErrorSS-0.000000FirstOrderAutocorrelation-0.354205Durbin-WatsonD2.694808《金融数据挖掘与应用》课程作业5(3)三阶趋势模型DependentVariable:zb源变量自由度平方和均值F值概率值SumofSourceDFSquaresMeanSquareFValuePrFModel693393.4641415565.5773683.21.0001Error81496.53586187.06698CorrectedTotal1494890.00000R-SquareCoeffVarRootMSEzbMean0.9842293.94156913.67724347.0000SourceDFTypeISSMeanSquareFValuePrFx189541.5655889541.56558478.66.0001y11073.644351073.64
本文标题:金融数据挖掘.
链接地址:https://www.777doc.com/doc-6678334 .html