应用时间序列分析第4章答案解析_第1页
应用时间序列分析第4章答案解析_第2页
已阅读5页,还剩16页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

河南大学:姓名:汪宝班级:七班学号:1122314451班级序号:685:我国1949年-2008年年末人口总数(单位:万人)序列如表4-8所示(行数据).选择适当的模型拟合该序列的长期数据,并作5期预测。解:具体解题过程如下:(本题代码我是做一问写一问的)1:观察时序图:datawangbao4_5;inputx@@;time=1949+_n_-1;cards;5416755196563005748258796602666146562828646536599467207662076585967295691727049972538745427636878534806718299285229871778921190859924209371794974962599754298705100072101654103008104357105851107507109300111026112704114333115823117171118517119850121121122389123626124761125786126743127627128453129227129988130756131448132129132802Iprocgplotdata=wangbao4_5;plotx*time=1;symbol1c=blackv=stari=join;run;10000SOOijO500001Adio1A7H1AAI17汕『I2(111120000ODCIOO9000080000?0LlflUrun;10000SOOijO500001Adio1A7H1AAI17汕『I2(111120000ODCIOO9000080000?0LlflU4Q0i血30000分析:通过时序图,我可以发现我国1949年-2008年年末人口总数(随时间的变化呈现出线性变化.故此时我可以用线性模型拟合序列的发展.-Xt=a+bt+Itt=123,...,6OE(It)=O,var(It)=6其中,It为随机波动;Xt=a+b就是消除随机波动的影响之后该序列的长期趋势。2:进行线性模型拟合:procautoregdata=wangbao4_5;modelx=time;outputout=outp=wangbao4_5_cup;procgplotdata=out;plotx*time=1wangbao4_5_cup*time=2/overlay;symbol2c=redv=nonei=joinw=21=3;run;

TheSriSSystem15:28Wednesday,December7,20131TheAUTOREGProcedureDependentVariablexClrdineiryLeastSquarusEstimaitesSSEMSESBCRegressR-SquareDurbin-Watson26223660745223551085.889830.99810.0724DFERootMSEAICTotalR-Sc1081luare582127.711140.9981VariableDFEmtimateStandardErrortValueApproxPr>111Intercept1-2770828313S6-88.34<.000111me11449is.esisC.OOOI分析:由上面输出结果可知:两个参数的p值明显小于0.05,即这两个参数都是具有显著非零,4:模型检验又因为RegressR-square=totalR-square=0.9931,即拟合度达到99.31%所以用这个模型拟合的非常好。5:结论所以本题拟合的模型为:Xt=-2770828+1449t+Itt=123,...,60E(It)=O,var(It)=66:作5期预测

procforecastdata二wangbao4_5method二stepartrend二2lead=5out=outoutfulloutest=est;idt;varx;procgplotdata=out;plotx*time=_type_/href=2008;symbol]i二nonev=starc二black;symbol2i二joinv二nonec=red;symbol3i二joinv二nonec=blackl=2;symbol4i二joinv二nonec=blackl=2;run;5D0D01B4DI5DQD0I4.DQD0MDflDflI2DQD0I1DQD0IflDaDflaDQDO9DQD0TDflDfl6DODO:MM13P196nIA?01BQO138020005D0D01B4DI5DQD0I4.DQD0MDflDflI2DQD0I1DQD0IflDaDflaDQDO9DQD0TDflDfl6DODO:MM13P196nIA?01BQO13802000MM6:爱荷华州1948-1979年非农产品季度收入数据如表4——9所示(行数据),选择适当的模型拟合该序列的长期趋势。解:具体做题过程如下:(本题代码我是做一问写一问的)1、绘制时序图datawangbao4_6;inputx@@;time=_n_;cards;TOC\o"1-5"\h\z60160462062664164264565568267869270773675376377577578379481382382682983183083885487288290391993792796297599510011013102110281027104810701095111311431154117311781183120512081209122312381245125812781294131413231336135513771416143014551480151415451589163416691715176018121809182818711892194619832013204520482097214021712208227223112349236224422479252825712634268427902890296430853159323733583489358836243719382139344028412942054349446345984725482749395067523154085492565358285965;procgplotdata=wangbao4_6;plotx*time;symbolc=blackv=stari=join;run;500030QDIDO[|id2D304D6D70EDmo分析;可知时序图显示该序列有明显的曲线递增趋势。尝试使用修正指数型模型进行迭代拟合:2、拟合模型procnlinmethod=gauss;modelx=a+b*c**time;parametersa=0.1b=0.1c=1.1;outputpredicted=xhatout=out;NLIN过程输出以下六方面信息:1)迭代过程x=a+bet+$,

tt……,128IlerIterati\■已PhasebSumofcSquares2)收敛状况3)估计信息摘要123415161718NOTE:0.10001126.21123.11119.01114.011C7.61098.81079.01065.71035.3.8.65844?33197COCO.1605.96D4.8604.86D4.8Convergence0.10001.10009.5216ES0.39561.06781.8825E80.52481.06E81.8SO5ES0.7M81.06251.8803E80.9S5&1.05961.8S01ES1.41121.05681.8773E82.02031.0535I.SCSSES2.89911.05051.8489E84.13611.04761.815E85.82241.04501.7634E810.25071.04031.74E821.07871.08471.6792E861.53051.02811.3238E8101.81.033222849327107.01.0312543005111.71.0807895973112.21.0307395624112.21.0307395624112.21.0307395624criterion(本次迭代收敛)EstimationNummaryMethodGauss-MevftonIterations18SubiteratIonsViAverageSubiterations1.222222R5.563E-7PPC(b)82.26EE-7RPC(b)5.627E-6Object1.99E-10Objective395624□bservationsRead128Obser^ationsUsed128□bservaticinmMissing04)主要统计量Source[JFSumofSquaresMeanSquareFValueModel22.4608E81.2304E838S75.9Error1253956243165.0UorrectedToteil1272.4648E8ApprcxPr>F<.00015)参数信息摘要ParameterEatimsiteApproxStdErrorApproximate95^ConfideneeLimits604.813.0152579.0630.E112.24.0939104.1120.31.03070.0002981.03011.0312得到的拟合模型为:x二604.8+112.2x1.03071+et=1,2,tt6)近似相关矩阵ApproximateCorr&lionMatrizabca1.0000000-0.87589790.8427539b-0.8758373I.ODOOOOO-0.9351736c0.8427533-0.93517361.00000003、拟合效果为了直观看出拟合效果,我们可以将原序列值和拟合值联合作图:procgplotdata=out;plotx*t=1xhat*t=2/overlay;symbollc=blackv=stari=join;分析:由上图图我们可以看出,原序列值和拟合值很接近,拟合效果较好。综合以上的分析,我们可以选择模型:x-604.8+112.2x1.03071+e来拟合该序列的长期趋势。拟合效果很不错。tt8:某城市1980年1月至1995年8月每月屠宰生猪的数量(单位:头)如表1—11所示(行数据),选择适当的模型拟合该序列的发展,并预测1995年9月至1997年9月该城市的生猪屠宰量。解:具体解题过程如下:(本题代码我是做一问写一问的)atawangbao4_8;inputx@@;time=_n_;cards;7637871947338739642810508495741110647100311941331030559059510145776889812919164396228102736100264103491970279524091680101259109564768928577395210937719820297906100306940891026807791993561117062812258835710617591922104114109959978801053869647997580109490110191909749898110718894177115097113696114532120110936071109251033121201841030691033511113311061611115909944710198785333869701005618954389265827197949874846738197702978446869787587869571757226418277357632925938078332723815597169750854727013379125858058177886852690697955688174666987225873445761318608275443739697813978646662697377680034706948182375640755408222975345770347858979769759827807477588841009796689051935038474774531919008163589797810227826577271850439541879568103283957709129710124411452510113993866951711001831039261026431083879707790901903368873283759992677329278943943999293790130910551060621035601040751017839379110231382413835341090119649910243010300291815990671100671015999764610493088905899361067238430711489610674987892100506procgplotdata=wangbao4_8;plotx*time=1;symbollc=redi=joinv=star;run;procarimadata=wangbao4_8;identifyvar=x;1:时序图与平稳性判别屠宰量大约在80000上下波动。所以由该序列图我可以认为它是个平稳的数列。即可以用第三章的AR模型或MA模型或ARMA模型进行拟合。但是为了稳妥起见,我还需要利用自相关图进一步辅助识别。具体如下:自相关图:1/:斗HWednesday,December1/:斗HWednesday,DecemberHU1H1The^RIMAProcedureNameofVariabIe-xMeanofWorkinsSeries90640.34StandsrdDeviation13880.89NumberofObccrvationc188NumberofObccrvationc188AutocorreIations&o1234567—no9o123&o1234567—no9o1234R-678:H.1—1—f—1—1—1—1—-a—1—LCovarianceCorreIation-1907654.9210294567891StdError19230119611462298610316775111Pfinanis0239461433C357CC88735393315703967970123630632668CCC51C7775911183ddbeitia^I57138675572040075127-13263711895052085763343414931.000000.594210.53432n.RfliRn0.430240.45C730.46000U.4Zi!bb0.413590.418000.045520.39352U.4Bb4I0.296210.296550.265810.192420.2700I0.17303iji丁订・・丁订・・iji订・iE・T"F>!>>!■::::::0.0729320.095264n.11fin胎0.1255250.13313C0.1422520.1499560.15S17C0.1613910.1C750斗0.171282U.I沁氏0.1830070.1855400.1S80440.1910320.1910660.193035分析:由上图可知:样本自相关图中的自相关系数在延迟4阶之后几乎全部落入2个标准差范围之内,并且向零衰减的速度还是比较快的。所以我认为该序列是平稳的序列。由时序图与自相关图可知其是平稳序列。故可以用第三章的AR模型或MA模型或ARMA模型进行拟合lhe淞AsternV:42:edneW?December打HTheARIMAProcedureAutocorreationCheckforWhiteNoiseToChi-Pr>LagSquare[)FChiSq6311.336<.05010.53412519.0612<.00010.42818599.1818<.08010.29824634.1624<.00010.179-Autocorrelations----0.5350.5850.4300.4860.4600.4140.4180.3460.3940.4850.297o.2ee0.1920.2700.1780.1820.1200.1980.1780.106分析:由上面数据可知:由于p值显著小于0.05,故可以否定原假设(H。),接受备选假设旧丿,即我可以认为该序列是平稳的非纯随机性序列。这样就说明了我们可以根据历史信息预测未来月的生猪屠宰量。PairtialAutocorrektionsLagCorrelation-13876543210123456783112U045678901234567009012-■--------12U045678901234567009012-■---------.・■23240.594210.20098U.y1//B-O.OC3240.182930.03637O.O8G09-0.015560.10226-0.091360.137670.20160-0.20333-0.09154-0.116450.004490.05737-0.097120.00789-0.03669-0.017040.047190.058900.03542■H;艸.*!lL***:+::+::+::■+:.!+!!4!■啊-Hi.「!+!!4!-:!+:半・分析:观察自相关图和偏自相关图,从这两图来看,偏自相关图是拖尾,而自相关系数是拖尾的。因而我们可以用ARMA模型进行拟合。但是为了稳妥起见,我还需要利用计算机进行相对最优定阶。2:相对最优定阶:identifyvar=xnlag=18minicp=(0:5)q=(0:5);run;2d1316SAS:玉h杳"l亡inTHeARIMA尸ldc=©«zI«_i厂□MA1MA3MA5MA-4MAZman5B12CSE^-BESlHTlnn^^EETls7221-1----5-曰曰曰曰「5HH7BES吕口1BED日却曰口73SB2B<1

722m

------

曰曰曰曰55BBB57S□SEESS7BB4337DD3D17S211-曰曰7曰曰5曰曰;□口7BD1S1日7-4E2_sH21-----・ss曰曰曰曰「「1AB74B_snE731B7EE7Bs-sm-B----51BBSS7E1341

丁丁口AE3N

BBBEDS

曰4曰7Z曰1e_b[曰■耳1B-1B_I□12日斗D

AAAARRAAAAAAEr-rizirNarI0aEr-rizirNarI0aMiriimljhiTutjaVa.Ii_i曰zBICC-4t.E>=,5),因而我们接下来分析:从上图可以看出,在众多模型中,ARMA模型的BIC信息量是最小的是ARMA(4会采用ARMA模型来进行拟合分析,这和我们人工预测的相吻合。

,5),因而我们接下来3:参数估计:estimatep=4q=5;run;具体输出结果如下图:TheARIMAProcedureCondiConditianaILeastSquaresEstimationParameterEstimateStandardErrortValueApproxPr>|t|7G42G.570G4.410.82<.00010.844110.239053.530.0005-0.480980.23838-2.020.Q4E1-0.424420.19931-2.130.03460.GG3130.09581G.94<.0001-0.204330.11103-1.840.06671.214E70.237455.11<■0001■0.702280.35137-2.000.04720.049$50.308&7o.ie0.S72O0.412430.189542.180.0309ConstsintEstimateVarianceEstimate1344.097991G4C17StdErrorEstimate9358.143AIC4004.756SBC4037.12NumberofResiduals188mrilCandSBCdonotinclude1理determinant.Paramet亡rMU脚,2昭1,3M闭,4胎1,5AR1J聃1,5Paramet亡rMU脚,2昭1,3M闭,4胎1,5AR1J聃1,5-0.021-0.791on-42o?56801-Mh-QuCxionl—ooo1ortR2-u5057-H--H--H--H-oAR1,2-0.016-0.S850.934-0.8190.2820.641-0.951■10

Ari7667080-H--M.M-_111Qu-H-1—4-H-TI—oono4_h-COooooooo-0.024-O.S010.798-0.8750.3830.569-0.844ParameterMUMA1n1MAI,2MAI,3渦1,4MU1.0000.033-0.0460.012-0.036MALI0.0331.000-0.8940.754-0.097-0.046-0.8341.000-0.8650.3660.0120.754-0.8651.000-0.612MAI,4-0.036-0.0870.366-n.m1.000舶1,5-0.021-0.7910.658-0.364-0.282胡1,1-O.OD20.950-0.8750.754-0.192胡1,2-0.016-0.8950.934-0.8190.282胡1,3O.OD70.786-0.8760.887-0.400ARI,4-0.024-0.8010.798-0.8750.383CorrelationsofFnrameterEstimsit亡s

1U:4UWednesday,December/,illlJIhe沁冷悴1U:4UWednesday,December/,illlJTheARIUAProcedureCorrelationsofParoet&rEstimatesAR1,3宜R1,4ARI,20.641-0.9511.000ARIJ-a.5190.840-0.934師1,4a.569-0.8440.857ParameterMAI,5ARIJARI,24023fl48080.857-0.9421.000riutocorrelationCheckofResiduaIsToChi-Pr>LagSquareDFChiSqAutocorrelationsoJI7453089131-H-7—-U-M-JI-H_1—039517JI22<.00010.00050.0044O.OOS40.00670.00330.0030.008C.109-0.0310.0730.0280.0270.0280.0290.0140.0840.D620.0330.0320.020-0.068-0.043-0.136-0.029-0.02&-0.0840.005-0.0960.0970.0.7—-H--H--H-7—1—1-25-634oooooo44846SCO£-£-H--n.LJIJ11—ooooo0.080ModeIfarvariablekEstimatedMean7642S.47AutcifEgr-EggiveFsictorsFactar1:1-1.21457时机1)+0.7D228帥觥2)-0.04985即狀3)-0.41243M⑷该输出形式等价于xt=(1-1.21457B+0.70228B2-0.04985B3-0.41243B4)€t故该模型为:xt=p+(e(B)®(B))€t=⑶序列预测(1995年9月至1997年9月)forecastlead=24id=timeout=wangbaoyc;run;

TheSASSystem18:43?ednesdaj/,December7,201317TheftRIMfiProcedureForecastsforvariableObs901200456789012845670Q801s3sss3s3s3-9o・u-DOOOOOOO111111111111JI2-22222222222212Forecast9G315.903436460.143296995.951897636.395496736.895935486.302094853.762595182.133495B92.D65095312.250484439.755433732.426183641.183333888.203493812.323893290.069092667.539992389.E04592395.845592890.489

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论