时间序列上机作业一

时间序列上机作业一

ID:47044865

大小:115.50 KB

页数:8页

时间:2019-07-07

时间序列上机作业一_第1页
时间序列上机作业一_第2页
时间序列上机作业一_第3页
时间序列上机作业一_第4页
时间序列上机作业一_第5页
资源描述:

《时间序列上机作业一》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、上机作业一程序:习题3.8(a)library(TSA)data(retail)plot(retail,type='l',ylab='sales')points(y=retail,x=time(retail),pch=as.vector(season(retail)))(b)library(TSA)data(retail)retailmonth=season(retail)monthreg=lm(retail~month+time(retail))summary(reg)(c)plot(y=rstudent(reg),x=as.vector(time(retail)),type='l',y

2、lab='Standardizedresiduals',xlab='Time')points(y=rstudent(reg),x=as.vector(time(retail)),pch=as.vector(season(retail)))结果输出:(a)(b)reg=lm(retail~month+time(retail))>summary(reg)Call:lm(formula=retail~month+time(retail))Residuals:Min1QMedian3QMax-19.8950-2.4440-0.35182.197116.2045Coefficients:Estima

3、teStd.ErrortvaluePr(>

4、t

5、)(Intercept)-7.249e+038.724e+01-83.099<2e-16***monthFebruary-3.015e+001.290e+00-2.3370.02024*monthMarch7.469e-021.290e+000.0580.95387monthApril3.447e+001.305e+002.6410.00880**monthMay3.108e+001.305e+002.3810.01803*monthJune3.074e+001.305e+002.3550.01932*monthJuly6.053e+001.

6、305e+004.6385.76e-06***monthAugust3.138e+001.305e+002.4040.01695*monthSeptember3.428e+001.305e+002.6260.00919**monthOctober8.555e+001.305e+006.5553.34e-10***monthNovember2.082e+011.305e+0015.948<2e-16***monthDecember5.254e+011.305e+0040.255<2e-16***time(retail)3.670e+004.369e-0283.995<2e-16***---S

7、ignif.codes:0‘***’0.001‘**’0.01‘*’0.05‘.’0.1‘’1Residualstandarderror:4.278on242degreesoffreedomMultipleR-squared:0.9767,AdjustedR-squared:0.9755F-statistic:845on12and242DF,p-value:<2.2e-16(c)习题3.14程序:(a)library(TSA)data(retail)retailmonth=season(retail)monthreg=lm(retail~month+time(retail))summary

8、(reg)(b)runs(rstudent(reg))(c)acf(rstudent(reg))(d)qqnorm(rstudent(reg))qqline(rstudent(reg))hist(rstudent(reg),xlab='StandardizedResiduals')shapiro.test(rstudent(reg))结果输出:(a)>library(TSA)>data(retail)>retailJanFebMarAprMayJunJulAugSepOctNovDec198642.439.242.243.943.745.547.146.447.749.457.175.31

9、98745.944.045.049.347.048.952.251.151.554.662.783.5198853.449.050.853.453.854.358.557.356.960.869.293.7198957.853.956.657.559.557.560.160.060.363.571.699.5199061.458.560.062.663.661.465.463.363.165.772.9103.41991

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。