[R] regression using a lagged dependent variable as explanatory variable

From: giacomo moro <gmbegnis_at_yahoo.it>
Date: Sun 16 Oct 2005 - 01:33:40 EST


Hi,
I would like to regress y (dependent variable) on x (independent variable) and y(-1). I have create the y(-1) variable in this way: ly<-lag(y, -1) Now if I do the following regression lm (y ~ x + ly) the results I obtain are not correct. Can someone tell me the code to use in R in order to perform a regression using as explanatory variable a lagged dependent variable? My best regards,

                    Giacomo

		
---------------------------------

	[[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Oct 16 01:40:11 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:40:45 EST