![时序答案第三章习题12_第1页](http://file4.renrendoc.com/view/7fd866bfe50c42bbfdb097ee01551011/7fd866bfe50c42bbfdb097ee015510111.gif)
![时序答案第三章习题12_第2页](http://file4.renrendoc.com/view/7fd866bfe50c42bbfdb097ee01551011/7fd866bfe50c42bbfdb097ee015510112.gif)
![时序答案第三章习题12_第3页](http://file4.renrendoc.com/view/7fd866bfe50c42bbfdb097ee01551011/7fd866bfe50c42bbfdb097ee015510113.gif)
![时序答案第三章习题12_第4页](http://file4.renrendoc.com/view/7fd866bfe50c42bbfdb097ee01551011/7fd866bfe50c42bbfdb097ee015510114.gif)
![时序答案第三章习题12_第5页](http://file4.renrendoc.com/view/7fd866bfe50c42bbfdb097ee01551011/7fd866bfe50c42bbfdb097ee015510115.gif)
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
1、习题 17(1)xiti17-scan(3.17.txt)Read 63 items ts.plot(xiti17)acf(xiti17)pacf(xiti17,xlab=jieshu,xlim=c(0,20),lag.max=20)时序没有显示明显的趋势性或者周期性,自相关系数二阶截尾,偏自相关系数拖尾是个平稳序列Box.test(xiti17,type=Ljung,lag=1)Box-Ljung testdata:xiti17X-squared = 6.1906, df = 1, p-value = 0.01284Box.test(xiti17,type=Ljung,lag=2)Box-L
2、jung testdata:xiti17X-squared = 12.064, df = 2, p-value = 0.002401Box.test(xiti17,type=Ljung,lag=3)Box-Ljung testdata:xiti17X-squared = 12.1592, df = 3, p-value = 0.006857Box.test(xiti17,type=Ljung,lag=6)Box-Ljung testdata:xiti17X-squared = 13.284, df = 6, p-value = 0.03874原假设,应该是非随机的(2)利用 AR(2)模型来拟
3、合xiti17.m1 pt(0.2541/0.1262,df=61,lower.tail=F)*2 1 0.04848292 pt(0.2374/0.1262,df=61,lower.tail=F)*2 1 0.06472759 pt(81.5418/5.2980,df=61,lower.tail=F)*2 1 1.120962e-22如果用AR(1)模型?Box.test(xiti17.m1$residuals,type=Ljung,lag=3,fitdf=2)调用 help(Box.test)Box-Ljung testdata:xiti17.m1$residualsX-squared =
4、 0.9072, df = 1, p-value = 0.3409Box.test(xiti17.m1$residuals,type=Ljung,lag=4,fitdf=2)Box-Ljung testdata:xiti17.m1$residualsX-squared = 1.3824, df = 2, p-value = 0.501Box.test(xiti17.m1$residuals,type=Ljung,lag=6,fitdf=2)Box-Ljung testdata:xiti17.m1$residualsX-squared = 1.4037, df = 4, p-value = 0.
5、8435P 值都大于显著性水平,所以模型残差是白噪声序列(3)a-predict(xiti17.m1,n.ahead=5)a$predTime Series:Start = 64End = 68Frequency = 11 92.44339 91.06750 86.55037 85.07581 83.62883该城市未来五年的降雪量$seAR(1)模型结果: Coefficients:ar1ercept0.330280.8793s.e.0.12364.1723pt(0.3302/0.1236,df=62,lower.tail=F)*2 1 0.009633125pt(80.8793/4.172
6、3,df=62,lower.tail=F)*2 1 5.266425e-28各参数均显著Time Series:Start = 64End = 68Frequency = 11 21.67058 22.35943 23.29727 23.48584 23.59899ts.plot(xiti17,xlim=c(0,70)lines(a$pred,col=red)在序列图上作出值U-a$pred+1.96*a$seL-a$pred-1.96*a$selines(U,col=blue)lines(L,col=blue)习题 18(1)xiti18-scan(3.18.txt) Read 74 ite
7、msts.plot(xiti18)acf(xiti18)pacf(xiti18)Box.test(xiti18,type=Ljung,lag=1)Box-Ljung testdata:xiti18X-squared = 10.1752, df = 1, p-value = 0.001423Box.test(xiti18,type=Ljung,lag=2)Box-Ljung testdata:xiti18X-squared = 15.71, df = 2, p-value = 0.0003878Box.test(xiti18,type=Ljung,lag=3)Box-Ljung testdata
8、:xiti18X-squared = 19.7793, df = 3, p-value = 0.0001886Box.test(xiti18,type=Ljung,lag=6)Box-Ljung testdata:xiti18X-squared = 29.8725, df = 6, p-value = 4.156e-05平稳序列,P 值较小,原假设,是非白噪声序列(2)利用 ARMA(1,2)模拟xiti18.m1-arima(xiti18,order=c(1,0,2),method=ML)xiti18.m1Call:arima(x = xiti18, order = c(1, 0, 2),
9、method = ML)Coefficients:ar1 0.9462s.e.0.0736ma1ma2ercept0.83520.1187-0.6959-0.05930.14260.1233sigma2 estimated as 0.0688:log likelihood = -6.25,aic = 22.51ercept=(1-0.9462)*0.8352=0.04493376得出的模型为: = 0.04493376 + 0.94621 + 0.69591 0.05932?pt(0.9462/0.0736,df=71,lower.tail=F)*2 1 3.259342e-20pt(0.69
10、59/0.1426,df=71,lower.tail=F)*2 1 6.295711e-06pt(0.0593/0.1233,df=71,lower.tail=F)*21 0.6320374pt(0.8352/0.1187,df=71,lower.tail=F)*2 1 1.007717e-09ARMA(1,2)模型中,MA2 参数不显如果采用 ARMA(1,1)模型,各参数显著Box.test(xiti18.m2$residuals,type=Ljung,lag=3,fitdf=2)Box-Ljung testdata:xiti18.m2$residualsX-squared = 0.196
11、1, df = 1, p-value = 0.6579Box.test(xiti18.m2$residuals,type=Ljung,lag=4,fitdf=2)Box-Ljung test如果用 ARMA(1,1)模型xiti18.m2-arima(xiti18,order=c(1,0,1),method=ML)xiti18.m2著Call:arima(x = xiti18, order = c(1, 0, 1), method = ML)Coefficients:ar1ma1ercept 0.9354-0.72650.8321s.e.0.08380.14760.1134sigma2 est
12、imated as 0.06903:log likelihood = -6.37,aic = 20.74pt(0.9354/0.0838,df=72,lower.tail=F)*2 1 2.30512e-17pt(0.7265/0.1476,df=72,lower.tail=F)*2 1 5.254795e-06pt(0.8321/0.1134,df=72,lower.tail=F)*2 1 2.622869e-10data:xiti18.m2$residualsX-squared = 0.1966, df = 2, p-value = 0.9064Box.test(xiti18.m2$res
13、iduals,type=Ljung,lag=5,fitdf=2)Box-Ljung testdata:xiti18.m2$residualsX-squared = 0.1986, df = 3, p-value = 0.9778Box.test(xiti18.m2$residuals,type=Ljung,lag=6,fitdf=2)Box-Ljung testdata:xiti18.m2$residualsX-squared = 0.4817, df = 4, p-value = 0.9753拟合的 arma(1,1)模型残差为白噪声序列 ercept=(1-0.9354)*0.8321 =
14、 0.05375366 + 0.93541 0.72651xiti18forecast-predict(xiti18.m2,n.ahead=5)xiti18forecast$predTime Series:Start = 75End = 79Frequency = 11 0.5588057 0.5764527 0.5929604 0.6084024 0.6228474+ $seTime Series:Start = 75End = 79Frequency = 11 0.2627327 0.2684068 0.2732753 0.2774654 0.2810806如果用AR(1)模型?习题 19
15、(1)xiti19-scan(3.19.txt) Read 201 itemsts.plot(xiti19)acf(xiti19)pacf(xiti19)ACF 拖尾、PACF 截尾,结合时序图认为其平稳Box.test(xiti19,type=Ljung,lag=1)Box-Ljung testdata:xiti19X-squared = 18.1473, df = 1, p-value = 2.045e-05Box.test(xiti19,type=Ljung,lag=2)Box-Ljung testdata:xiti19X-squared = 21.1223, df = 2, p-val
16、ue = 2.59e-05Box.test(xiti19,type=Ljung,lag=6)Box-Ljung testdata:xiti19X-squared = 31.0829, df = 6, p-value = 2.444e-05P 值较小,原假设,非白噪声序列(2)拟用AR(3)模型xiti19.m1-arima(xiti19,order=c(3,0,0),method=ML)xiti19.m1Call:arima(x = xiti19, order = c(3, 0, 0), method = ML)Coefficients:ar1-0.41180.0695ar2-0.29630.
17、0722ar3-0.18870.0701ercept84.12730.0987s.e.sigma2 estimated as 6.989:log likelihood = -480.77,aic = 971.53ercept=(1+0.4118+0.2963+0.1887)*84.1273=159.5727所以拟合的模型为 = 159.5727 + 0.41181 0.29632 0.18873各参数显著性检验:pt(0.4118/0.0695,df=198,lower.tail = F)*2 1 1.362645e-08pt(0.2963/0.0722,df=198,lower.tail = F)*2 1 5.935127e-05pt(0.1887/0.0701,df=198,lower.tail = F)*2 1 0.007713479P 值均较小,各参数皆是显著有效的(3)xiti19forecast-predict(xiti19.m1,n.ahead=1)xiti19forecast$predTime Series: Start = 202End = 202Frequency
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 运动疗法第十章Brunnstrom技术讲解
- 财政学:第七章 教育
- 2025北京市商品房预售合同(合同版本)
- 2025二手房购房合同协议
- 扩大劳务分包的合同范本
- 2025购车合同样例范本资料
- 2024年城市建设项目承包合同
- 全新阳光房合同下载
- 纱窗合同协议书
- 生产原料购销合同范本
- 山东省滨州市滨城区2024-2025学年九年级上学期期末考试化学试题
- 期末试卷:安徽省宣城市2021-2022学年七年级上学期期末历史试题(解析版)
- 2024年湖南省公务员录用考试《行测》真题及答案解析
- 2024新版(北京版)三年级英语上册单词带音标
- 第21课 活动课 从考古发现看中华文明的起源 教学课件
- 部编版《道德与法治》四年级下册教材解读与分析文档
- PP、PVC-风管制作安装施工作业指导书
- 苏教版五年级上册脱式计算300道及答案
- 辽宁省沈阳市铁西区2025届初三最后一次模拟(I卷)数学试题含解析
- 幼教培训课件:《幼儿园如何有效组织幼儿户外自主游戏》
- 2024-2030年中国轻型运动飞机行业市场发展趋势与前景展望战略分析报告
评论
0/150
提交评论