x <- seq(min(as.Date(index(to.quarterly(SP5[kikan])[,1]))),as.Date(max(index(to.quarterly(SP5[kikan])[,1]))),"quarters")
result <- (lm(apply.quarterly(SP5[kikan],mean)[,1] ~ apply.quarterly(PA[kikan],mean) * apply.quarterly(UC[kikan],mean) * G[kikan] *PROP[kikan] - apply.quarterly(UC[kikan],mean) ))
plot(predict(result),type='l',col=2,axes=F,ylim=c(0,2500),ylab="")
par(new=T)
plot(x,to.quarterly(SP5[kikan])[,1],type='l',ylim=c(0,2500))
axis(side=2, pos=as.Date("2017-01-01")) # draw aux axis at 2017-01-01
axis(side=2, pos=as.Date("2010-01-01"),labels=F) # draw aux axis at 2010-01-01
par(new=T)
plot(x,rep(2400,length(x)),type='l',col=3,ylim=c(0,2500)) # draw the line at 2400 level
Residual standard error: 61.12 on 87 degrees of freedom
Multiple R-squared: 0.9863, Adjusted R-squared: 0.9841
F-statistic: 446.8 on 14 and 87 DF, p-value: < 2.2e-16
0 件のコメント:
コメントを投稿