lag is a very confusing function i try to plot lag(x,-h) and y , the results are the same figures for all the h lags. then i saw online people use lag(x,-h) as xreg in arima that won't work in my eyes if lag function is consistent, isnce it returns the same value for all the lags i don't know in which occasion people will use this function besides I suppose Lag(x,h) is the same as lag(x,-h) when doing regression, so include xreg=Lag(x,h) and xreg=lag(x,-h) in both models but the results are not the same is there anyone interested in these functions? -- View this message in context: http://r.789695.n4.nabble.com/Lag-and-lag-tp4280962p4280962.html Sent from the R help mailing list archive at Nabble.com.
besides I use Lag(x,h) to plot the lagged ts graph, it is very usefful but when doing the regression(arima, xreg=), i am really not sure if I should use lag(x,-h) or Lag(x,h) from online i see people use lag(x,-h), but i didnt believe that, bc I can't plot the lagged graph using this function. so i think i maybe should use Lag(x,h) as xreg -- View this message in context: http://r.789695.n4.nabble.com/Lag-and-lag-tp4280962p4280973.html Sent from the R help mailing list archive at Nabble.com.