Displaying 1 result from an estimated 1 matches for "qdts".
Did you mean:
gdts
2008 Nov 08
4
Plotting Standard Regression Fit-Am I wrong or a bug?
I'm trying to plot a time series (quarterly observations, seasonal effect,
T=56),regression line and predicted point on the same plot.
I'm using following commands:
> plot(qdts,xlim=c(1982,1997))
> lines(fitted(m2)~time,data=qd,col="red")
> points(predict(m2,newdata=nqd),col="blue")
where:
qdts<-ts(qd$durables,start=c(1982,1),freq=4)
m2<-lm(qdts~time+quar)
time<-seq(1,length(qdts),1)
nqd<-data.frame(time=c(57),quar=c(1))
Unfortunate...