| 所在主题: | |
| 文件名: R plot 1.docx | |
| 资料下载链接地址: https://bbs.pinggu.org/a-1902634.html | |
| 附件大小: | |
|
刚接触R不久,只懂得一些浅显的基础知识,这边有一组关于时间序列的图片比较困惑,希望大神们可以帮我解释一下。下面是R的程序,然后是doc文档中是plot图,希望可以有比较详细的解释.
> par(mfrow=c(1,1)) > plot(bicoal.tons,xlab="Year",ylab="Production in Millions ofNet Tons of Bitumous Coal",pch="*",type="b",main="Production of Bitumous Coal Between 1920 and 1968") > xt<-time(bicoal.tons)-1945 > mod<-rlm(bicoal.tons~cbind(xt,xt^2)) > mod$coefficients (Intercept) cbind(xt, xt^2)xt cbind(xt, xt^2)xt^2 472.51468692 0.29658002 0.02902045 > plot(mod$residuals,xlab="Year",ylab = "Production in Millions ofNet Tons of Bitumous Coal",pch="*",type="b",main="Production of Bitumous Coal Between 1920 and 1968") > Ident(mod$residuals,"Detrended Bitumous Coal Data","Raw Scale") > fin<-Raic(mod$residuals) > par(mfrow=c(1,1),oma=c(4,0,6,0)) > c1<-2/sqrt(length(bicoal.tons)) > plot(fin$k,diag(fin$coef),ylim = range(diag(fin$coef),c1,-c1),type = "b",lty=2,main="Robust PACF",xlab = "Autorefression Order",ylab = "Robust PACF") > box(lty = 1) > abline(h=c(-c1,c1),lty=2) > abline(h=0) > segments(fin$k,0,fin$k,diag(fin$coef)) > mtext("Identification for the Bitunous Coal Data,Quadratic Trend Fitted",3,1,outer = T,cex = 1.5) > fin$coef[1,1] [1] 0.7195047 > res<-fin$resid[,1] > fv<-mod$residuals[-1]-res > Ident(res,"Bitumous Coal Data","residuals from Quadratic Trend and AR(1) fit") > fin2<-Raic(res) > par(mfrow=c(1,1),oma=c(4,0,6,0)) > c1<-2/sqrt(length(bicoal.tons)) > plot(fin2$k,diag(fin2$coef),ylim = range(diag(fin2$coef),c1,-c1),type = "b",lty=2,main="Robust PACF",xlab="Autoregression Order",ylab = "Robust PACF") > box(lty=1) > abline(h=c(-c1,c1),lty=2) > abline(h=0) > segments(fin2$k,0,fin2$k,diag(fin2$coef)) > mtext("Identification for the Bitumou Coal Data,Quadratic trend and AR(1) Fitted",3,1,outer = T,cex = 1.5) > par(mfrow=c(2,2),oma=c(0,0,6,0)) > plot(1:(length(bicoal.tons)-1),res,type="b",pch="*",xlab="Time",ylab="Residuals",main="Residual Plot") > plot(fv,res,main="Residuals Versus Fitted Values",ylab="Residuals",xlab = "Fitted Values") > qqnorm(res,main="Quantile-Quantile Plot",ylab="Residuals",xlab = "Gaussian Quantiles") > plot(fv,abs(res),main="Absolute Residuals Versus Fitted Values",ylab = "Absolute Residuals",xlab = "Fitted Values") > lines(lowess(fv,abs(res))) > mtext("Residual Plots from quadratic trend and AR(1) fit to the Bitumous Coal Data",outer = T,side = 3,cex = 1.5) |
|
熟悉论坛请点击新手指南
|
|
| 下载说明 | |
|
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。 2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。 3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。 (如有侵权,欢迎举报) |
|
京ICP备16021002号-2 京B2-20170662号
京公网安备 11010802022788号
论坛法律顾问:王进律师
知识产权保护声明
免责及隐私声明