Hello,
I'm currently working with time series and I need lags for my calculations. Unfortunately the lag Operator (L.) is not working, whereas [_n-1] does.
Could you please help me with this issue? Sorry for my english and just let me know if u need further/other information (first post in this Forum).
Thank you in advance!
The table looks like this:

I'm currently working with time series and I need lags for my calculations. Unfortunately the lag Operator (L.) is not working, whereas [_n-1] does.
Could you please help me with this issue? Sorry for my english and just let me know if u need further/other information (first post in this Forum).
Thank you in advance!
Code:
tsset Date time variable: Date, Dec 1989 to Dec 2018, but with gaps gen USCPIinflationrate_lag2=L.USCPIinflationrate (349 missing values generated) gen USCPIinflationrate_lag= USCPIinflationrate[_n-1] (1 missing value generated)
Comment