已阅读5页,还剩27页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
时间序列基本概念,吴喜之,1,某些描述方法,2,3,#T2.1 n=200;t=1:n;alpha=0;beta=2;e=rnorm(n,0,10);x=alpha+beta*t+e;par(mfrow=c(2,2);plot(t,x,type=l);plot(t,beta*t,type=l);plot(t,e,type=l,ylim=c(0,400);par(mfrow=c(1,1),4,#T2.2 n=200;t=seq(0,6,len=n);e=rnorm(n); alpha=0;gamma=3;x= alpha+gamma*cos(t*5)+e;par(mfrow=c(2,2); plot(t,x,type=l);plot(t,gamma*cos(t*5),type=l,ylim=c(-5,5);plot(t,e,type=l,ylim=c(-5,5);par(mfrow=c(1,1),5,#T2.3 n=200;t=seq(0,6,len=n);e=rnorm(n); alpha=0;beta=6;gamma=3;x= alpha+beta*t+gamma*cos(t*5)+e;par(mfrow=c(2,2);plot(t,x,type=l);plot(t,gamma*cos(t*5),type=l,ylim=c(-5,40);plot(t,beta*t,type=l,ylim=c(-5,40);plot(t,e,type=l,ylim=c(-5,40);par(mfrow=c(1,1),6,#T2.4 n=200;t=seq(0,6,len=n);e=rnorm(n,0,2); alpha=0;beta=6;gamma=.2;x= (alpha+beta*t)*(gamma*cos(t*5)+e;par(mfrow=c(2,2);plot(t,x,type=l);plot(t,gamma*cos(t*5),type=l);plot(t,beta*t,type=l);plot(t,e,type=l);par(mfrow=c(1,1),7,#T2.5 n=200;t=seq(0,6,len=n);e=rnorm(n,0,2); alpha=0;beta=6;gamma=.2;x= (alpha+beta*t)*(gamma*cos(t*5)*e par(mfrow=c(2,2);plot(t,x,type=l);plot(t,gamma*cos(t*5),type=l);plot(t,beta*t,type=l);plot(t,e,type=l);par(mfrow=c(1,1),8,#Difference operation removing the trend #As T2.1 n=200;t=1:n;alpha=0;beta=2;e=rnorm(n,0,10);x=alpha+beta*t+e; par(mfrow=c(2,1); plot(t,x,type=l);plot(t-1,diff(x),type=l,ylim=c(-300,300);par(mfrow=c(1,1),9,# Difference operation removing the seasonal effect. set.seed(10); n=24;t=1:n;alpha=0;beta=2;e=rnorm(n,0,10);x=alpha+beta*t+e;m=n*30 y=rep(x,30)+rnorm(m);t=1:m;par(mfrow=c(2,1);plot(t,y,type=l);plot(t-(1:24),diff(y,24),type=l,ylim=c(-10,50);par(mfrow=c(1,1),10,# Difference operation removing both the trend and seasonal effect. set.seed(10);n=24;t=1:n;alpha=0;beta=2;e=rnorm(n,0,20);x=alpha+beta*t+e;m=n*30;gamma=.2;t=1:m;y=rep(x,30)+gamma*t1.35+rnorm(m);par(mfrow=c(1,2);plot(t,y,type=l);plot(t-(1:25),diff(diff(y,1),24),type=l,ylim=c(-10,50);par(mfrow=c(1,1),11,#Correlation library(TeachingDemos) if(interactive() run.cor2.examp() x=-10:10;y=x2;plot(x,y);cor(x,y);a=lm(yx);abline(a) set.seed(0) x=arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488),sd = sqrt(0.1796) par(mfrow=c(2,3) plot(x) a=acf(x) y=zlag(x,1);plot(as.vector(x-1),as.vector(y-1),main=substitute(r=that,list(that=a$acf1) y2=zlag(x,2);plot(as.vector(x-1),as.vector(y2-1),main=substitute(r=that,list(that=a$acf2) #y3=zlag(x,3);plot(as.vector(x-1),as.vector(y3-1),main=substitute(r=that,list(that=a$acf3) y10=zlag(x,10);plot(as.vector(x-1),as.vector(y10-1),main=substitute(r=that,list(that=a$acf10) y14=zlag(x,14);plot(as.vector(x-1),as.vector(y14-1),main=substitute(r=that,list(that=a$acf14) par(mfrow=c(1,1),12,13,x=scan(“c:/xzwu/tjbook3/data/tax.txt“) tax=ts(x/100000, frequency = 12, start = c(1995, 1) ts.plot(tax,ylab=“Tax“,ylim=c(-1.2,11.6),main=“Monthly Tax in a Chinese City (in Billion RMB)“) a=stl(tax, “period“)#Seasonal Decomposition of Time Series by Loess #,a$time.series has 3 columns (seasonal, trend, remainder) par(mfrow=c(2,2) ts.plot(tax,ylab=“Tax“,ylim=c(-1.2,11.6),main=“Monthly Tax in a Chinese City (in Billion RMB)“) plot(a$time.series,1,col=2,type=“l“,ylim=c(-1,12) plot(a$time.series,2,col=2,type=“l“,ylim=c(-1,12) plot(a$time.series,3,col=2,type=“l“,ylim=c(-1,12) par(mfrow=c(1,1) ts.plot(tax,ylab=“Tax“,ylim=c(-1.2,11.6),main=“Monthly Tax in a Chinese City (in Billion RMB)“) lines(a$time.series,1,col=2) lines(a$time.series,2,col=3) lines(a$time.series,3,col=4),14,15,ts.plot(tax,ylab=“Tax“,ylim=c(-1.2,11.6),main=“Monthly Tax in a Chinese City (in Billion RMB)“) lines(a$time.series,1,col=2);lines(a$time.series,2,col=3);lines(a$time.series
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- CCU团队对AMI后并发症的早期识别模拟训练
- 2025年青海省公务员行测真题模拟试卷含答案
- 2025年新型医疗健康服务模式可行性研究报告及总结分析
- 浙江省杭州重点中学2025-2026学年高二上学期11月期中考试英语试卷
- 英语专业培养方案终稿(2025-1)
- 建筑企业供应链管理模式研究
- 国际会计论文开题报告
- (完整版)浅论宋词的繁荣原因
- 应急设备测试题目及答案解析
- 作者与编辑的责任与关系协调
- 医院采购窗帘合同模板
- 公司无贷户营销(兰云)
- 制氢技术与工艺 课件 第5章 电解水制氢
- 小学数学骨干教师专题讲座《如何有效培养小学生的数学阅读能力》
- 【课件】纪念与象征-空间中的实体艺术+课件-高中美术人美版(2019)美术鉴赏
- DL∕T 2601-2023 火力发电厂尿素水解制氨系统调试导则
- DL∕T 1650-2016 小水电站并网运行规范
- 水利水电工程资料员手册
- 2024赛力斯企业研究报告(公司概况、核心业务、核心优势、驱动力等)-2024-06-新势力
- 数智时代的商业变革智慧树知到期末考试答案章节答案2024年山东大学(威海)
- 《道德经》的智慧启示-知到答案、智慧树答案
评论
0/150
提交评论