资源描述:
《时间序列分析与r软件》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、I.吋序图程序:da<-read.table(’’d:/ss.txt",header=T)dim(da)y=da[,1]m=da[,2]basicStats(m)plot(y,m,type=T)title(main='financialincomeofChina:1978-2010')2.吋序图:financialincomeofChina:1978-2010OOOO8OOOO9OOOOI7OOOOCNEo-1980198519901995200020052010y3.运行结果>da<-read.tab
2、le(’’d:/ss.txt’’,header=T)>dim(da)[1J332>y=da[,1]>m=daf,2]>basicStats(m)nobs3.300000e+01MeanMedianSumSEMeanLCLMeanUCLMeanVarianceStdevSkewnessKurtosisNAs().()()()(K)()e+O()Minimum1.132260c+03Maximum8.310151e+041.Quartile2.122010e+033.Quartile1.890364e+04
3、1.558852e+()45.218100C+035.144212e+053.764607e+037.920268e+032.325678e+044.676848c+082.162602e+041.716219e+001.927834e+00>plot(y,m,type=T)>title(main='financialincomeofChina:1978-2010')1.取对数:da<-rcad.tciblc("d:/ss.txtH,hcadcr=T)dim(da)y=da[JJlogm=log(da[
4、,2])basicStats(logm)plot(y,logm,typc=T)title(main='financialincomeofChina:1978-2010*)2.吋序图:financialincomeofChina:1978-201019801985199019952000200520101.运行结果>da<-read.table(nd:/ss.txt",header=T)>dim(da)[1J332>y=da[,1J>logm=log(da[,2])>basicStats(logm)nob
5、slogm33.000000NAs0.000000Minimum7.031971Maximum11.3278181.Quartile7.6601193.Quartile9.847110Mean8.770055Median8.559889Sum289.411829SEMean0.238490LCLMean8.284268UCLMean9.255843Variance1.876952Stdcv1.370019Skewness0.344385Kurtosis-1.253017>plot(y,logm,type
6、='l')>title(main='financialincomeofChina:1978-2010')1.一阶差分:da<-read.table("d:/ss.txt",header=T)dim(da)y=da[,lldy1=diff(log(da[,2]),lag=1)basicStats(dyl)plot(dyl,type=T)title(main='financialincomeofChina:1978-201O')2.吋序图:financialincomeofChina:1978-2010In
7、dex1.运行结果>da<-read.table("d:/ss.txt",header=T)>dim(da)[1]332>y=da[,l]>dyl=diff(log(da[,2]),lag=l)>basicStats(dyl)nobsdyl32.000000NAs0.000000Minimum0.011751Maximum0.2807211.Quartile0.0903963.Quartile0.182613Mean0.134245Median0.145147Sum4.295847SEMean0.012
8、126LCLMean0.109514UCLMean0.158976Variance0.004705Stdev0.068595Skewness-0.275913Kurtosis-0.779477四、对取对数之后的一阶差分序列作ACF、PACF检验:da<-read.table(Hd:/ss.txt,header=T)dim(da)y=da[,ljdyl=diff(log(da[,2]),lag=l)basicStats(dyl)plot(d