In this particular case, i.e. regressing diff(y) against x and x lagged one could write this:
lm(diff(y)~., data=as.data.frame(embed(x,2))) which works since the length of diff(y) happens to equal the number of rows in embed(x,2). fciclone <fciclone <at> bol.com.br> writes: : : Dear all, could someone please clarify me if this : works, so as to implement lags and differences for : example in y and in a independent x1 of a regression? : : model<-lm((diff(y), -i)~x1+lag(x1,-1), data=anydata) : : Thanks, a lot, : Alexandre. ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
