Red line shows actual, black one for the forecast. The graph starts from 1992-01-01 and ends at 2016-04-01 on a quarterly basis.
start_date <- "1992-01-01"
end_date <- "2016-04-01"
(
GDPC96
Below shows how to draw the graph.
plot(to.quarterly(SP5[paste(start_date,end_date,sep='::')])[,4],col=2,ylim=c(0,2500))
plot(seq(as.Date(start_date),as.Date(end_date),by="quarter"),predict(lm(to.quarterly(SP5[paste(start_date,end_date,sep='::')])[,4] ~
to . quarterly( PAYEMS[ paste( start_date, end_date, sep='::')]) [, 4] *
GDPC
0 件のコメント:
コメントを投稿