level 11
比如回归式为Yt=Y(-1)+X+et中Y的滞后1期如何表示。
回归后Y(-1)或者X的t值如何提取?
2017年07月08日 12点07分
2
level 11
the result should look like
groups time value lag.value1 a 1 1.5952808 NA2 a 2 0.3295078 1.59528083 a 3 -0.8204684 0.32950784 a 4 0.4874291 -0.82046845 b 1 -0.6264538 NA6 b 2 0.1836433 -0.62645387 b 3 -0.8356286 0.1836433
2017年07月08日 12点07分
4
level 11
I want to create lagged variable for a variable pm10 and used the following code. However, I could not get what I wanted. How could I create a lag of pm10?
2017年07月08日 12点07分
5
level 11
n base R the function lag() is useful for time series objects. Here you have a dataframe and the situation is somewhat different.
2017年07月08日 12点07分
6