[R] having a bit of regression trouble

2012-01-25 Thread Rampagegrl
I got the code for how to do regression without an intercept out of the back of my book and the next part of the homework asks me to do it with an intercept. The problem is, Q1 disappears whenever I try. Here is my code: Without the intercept: load("tsa3.rda") > > Q=factor(rep(1:4,21)) > reg=l

Re: [R] how do I do the autocovariance of a moving average?

2012-01-25 Thread Rampagegrl
thanks. -- View this message in context: http://r.789695.n4.nabble.com/how-do-I-do-the-autocovariance-of-a-moving-average-tp4322558p4328815.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.

[R] how do I do the autocovariance of a moving average?

2012-01-23 Thread Rampagegrl
Hi guys, I'm trying to do the autocovariance of a moving average but it's giving me errors. Here is my code: > w=rnorm(500,0,1) > v=filter(w, sides=2, rep(1/3,3)) > acf(w, lag.max=20) <=that printed out a nice graph. > acf(v, lag.max=20) Error in na.fail.default(as.ts(x)) : missing values in