时间序列分析实验报告3汇总

上传人:206****923 文档编号:90760001 上传时间:2019-06-16 格式:DOC 页数:18 大小:2.38MB
返回 下载 相关 举报
时间序列分析实验报告3汇总_第1页
第1页 / 共18页
时间序列分析实验报告3汇总_第2页
第2页 / 共18页
时间序列分析实验报告3汇总_第3页
第3页 / 共18页
时间序列分析实验报告3汇总_第4页
第4页 / 共18页
时间序列分析实验报告3汇总_第5页
第5页 / 共18页
点击查看更多>>
资源描述

《时间序列分析实验报告3汇总》由会员分享,可在线阅读,更多相关《时间序列分析实验报告3汇总(18页珍藏版)》请在金锄头文库上搜索。

1、 时间序列分析课程实验报告 时间序列分析课 程 实 验 报 告 项目名称:非平稳序列确定性分析组员姓名:李菲指导教师:牛宪华完成日期:2013 年 4 月 20日一、上机练习(P124)1.拟合线性趋势12.79 14.02 12.92 18.27 21.22 18.8125.73 26.27 26.75 28.73 31.71 33.95程序:data xiti1;input x;t=_n_;cards;12.79 14.02 12.92 18.27 21.22 18.8125.73 26.27 26.75 28.73 31.71 33.95;proc gplot data=xiti1;pl

2、ot x*t;symbol c=red v=star i=join;run;proc autoreg data=xiti1;model x=t;output predicted=xhat out=out;run;proc gplot data=out;plot x*t=1 xhat*t=2/overlay;symbol2 c=green v=star i=join;run;运行结果:分析:上图为该序列的时序图,可以看出其具有明显的线性递增趋势,故使用线性模型进行拟合:xt=a+bt+It,t=1,2,3,12分析:上图为拟合模型的参数估计值,其中a=9.7086,b=1.9829,它们的检验P

3、值均小于0.0001,即小于显著性水平0.05,拒绝原假设,故其参数均显著。从而所拟合模型为:xt=9.7086+1.9829t.分析:上图中绿色的线段为线性趋势拟合线,可以看出其与原数据基本吻合。2.拟合非线性趋势1.85 7.48 14.29 23.02 37.42 74.27 140.72265.81 528.23 1040.27 2064.25 4113.73 8212.21 16405.95程序:data xiti2;input x;t=_n_;cards;1.85 7.48 14.29 23.02 37.42 74.27 140.72265.81 528.23 1040.27 20

4、64.25 4113.73 8212.21 16405.95;proc gplot data=xiti2;plot x*t;symbol c=red v=star i=none;run;proc nlin method=gauss;model x=a*b*t;parameters a=0.1 b=1.1;der.a=b*t;der.b=a*t*b*(t-1);output predicted=xh out=out;run;proc gplot data=out;plot x*t=1 xh*t=2/overlay;symbol2 c=green v=none i=join;run;运行结果:分析

5、:上图为该时间序列的时序图,可以很明显的看出其基本是呈指数函数趋势慢慢递增的,故我们可以选择指数型模型进行非线性拟合:xt=abt+It,t=1,2,3,12分析:由上图可得该拟合模型为:xt=1.0309*1.9958t+It分析:图中的红色星号为原序列值,绿色的曲线为拟合后的拟合曲线,可以看出原序列值与拟合值基本上是重合的,故该拟合效果是很好的。3. X11过程40777 41778 43160 4589741947 44061 44378 4723743315 43396 44843 4683542833 43548 44637 4710742552 43526 45039 479404

6、3740 45007 46667 4932544878 46234 47055 5031846354 47260 48883 5260548527 50237 51592 5515250451 52294 54633 5880253990 55477 57850 61978程序:data xiti3;input x;t=intnx(quarter,1jan1978d,_n_-1);format t yyq4.;cards;40777 41778 43160 4589741947 44061 44378 4723743315 43396 44843 4683542833 43548 44637

7、4710742552 43526 45039 4794043740 45007 46667 4932544878 46234 47055 5031846354 47260 48883 5260548527 50237 51592 5515250451 52294 54633 5880253990 55477 57850 61978;proc gplot data=xiti3;plot x*t;symbol c=red v=star i=join;run;proc x11 data=xiti3;quarterly date=t;var x;output out=out b1=x d10=seas

8、on d11=adjusted d12=trend d13=irr;data out;set out;estimate=trend*season/100;proc gplot data=out;plot x*t=1 estimate*t=2/overlay;plot adjusted*t=1 trend*t=1 irr*t=1;symbol1 c=red i= join v=star;symbol2 c=black i= none v=star;run;运行结果:分析:上图为该序列的时序图,可以很明显的看出其具有长期增长趋势,且具有季节波动,故我们用X-11过程进行拟合。分析:上图为季节调整后

9、的序列值时序图。分析:上图为趋势拟合值序列时序图。分析:上图为不规则波动值的时序图。分析:上图中的红色线段为原序列值,黑色星星为拟合值,可以由图中看出该拟合值与原序列值基本上是重合的,故该拟合效果很好。4.Forecost过程程序:data xiti4;input x;t=1949+_n_-1;cards;40777 41778 43160 4589741947 44061 44378 4723743315 43396 44843 4683542833 43548 44637 4710742552 43526 45039 4794043740 45007 46667 4932544878 46

10、234 47055 5031846354 47260 48883 5260548527 50237 51592 5515250451 52294 54633 5880253990 55477 57850 61978;proc gplot data=xiti4;plot x*t;symbol c=red v=star i=join;run;proc forecast data=xiti4 method=stepar trend=2 lead=5 out=out outfull outest=est;id t;var x;run;proc gplot data=out;plot x*t=_type

11、_/href=2008;symbol1 i=join v=star c=black;symbol2 i=join v=none c=green;symbol3 i=join v=none c=red;symbol4 i=join v=none c=red;run;分析:由该序列的时序图可知,其具有长期趋势,且含有季节效应,趋势特征基本为线性趋势,即trend=2.分析:由上表可以很明显的看到每一年的与序列值、预测值,还有预测的后面六期预测值的95%置信区间。分析:此表为预测过程中相关参数及拟合效果,可以看到RSQUARE=0.9574111,拟合效果很好。分析:上图为预测效果图,其中绿色的线段

12、表示预测值,红色的代表预测的5期值的95%置信区间,黑色的为原序列,可以看出其预测效果很好。二、课后习题7. 某地区1962-1970年平均每头奶牛的月度产奶量数据(单位:磅)具体数据详见书P123589 561 640 656 727 697 640 599 568 577 553 582600 566 653 673 742 716 660 617 583 587 565 598628 618 688 705 770 736 678 639 604 611 594 634658 622 709 722 782 756 702 653 615 521 602 635677 635 736 7

13、55 811 798 735 697 661 667 645 688713 667 762 784 837 817 767 722 681 687 660 698717 696 775 796 858 826 783 740 701 706 677 711734 690 785 805 871 845 801 764 725 723 690 734750 707 807 824 886 859 819 783 740 747 711 751(1)绘制该序列的时序图,直观考察该序列的特点。程序:data lianxi1;input x;t=intnx(month,1jan1962d,_n_-1)

14、;format t date.;cards;589 561 640 656 727 697 640 599 568 577 553 582600 566 653 673 742 716 660 617 583 587 565 598628 618 688 705 770 736 678 639 604 611 594 634658 622 709 722 782 756 702 653 615 521 602 635677 635 736 755 811 798 735 697 661 667 645 688713 667 762 784 837 817 767 722 681 687 660 698717 696 775 796 858 826 783 740 701 706 677 711734 690 785 805 871 845 801 764 725 723 690 734750 707 807 824 886 859 819 783 740

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 中学教育 > 其它中学文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号