Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

2008-11-09 Thread uep
Thanks for your help and for being so patient with me Daniel Malter wrote: > > Do: > > length(variablename) > > where variablename is in {mats,time,quar}, i.e. do it for each of them. > This > will tell you. Btw: I think you might wanna pickup an introductory manual. > > Btw. Peter Dalgaard

Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

2008-11-08 Thread uep
However, now a linear regression with a factor for quarterly effect doesn't want to work for me: t2<-lm(mats~time+quar) and I get an error message: "Error in model.frame.default(formula = mats ~ time + quar, drop.unused.levels = TRUE) : variable lengths differ (found for 'quar')" Which variabl

Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

2008-11-08 Thread uep
gt;lines(fitted(t1)~time,col="blue") >points(c(3),predict(t1,newdata=nmat),col="red") Unfortunately for me, this example works and does plot fitted line and predicted points. I really don't understand why I can't make the same commands work when trying with my real life da

Re: [R] Plotting Standard Regression Fit-Am I wrong or a bug?

2008-11-08 Thread uep
uep wrote: > > 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="

[R] Plotting Standard Regression Fit-Am I wrong or a bug?

2008-11-08 Thread uep
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<-