optimlag {CommonTrend} | R Documentation |
Search the lag order to maximize Johansen Statistics (1988) assuming there is only one common trend.
optimlag(data, k=10, ecdet= "none" )
data |
Data used to construct the cointegration system |
k |
maximum number of lags to search |
ecdet |
Character, the same argument used in |
Under the assumption that there is only one common trend, if a lag oder is chosen to maximize the Johansen statistics , then the estimated signle common trend will best fit the original series.
‘none
’ is suggested to be chosen for ‘ecdet
’, since currently
this package only supports extrating common trend when intercept is included into VECM (but outside ECT).
Olag.value |
The maximized Johansen statistics (trace) |
Olag |
The lag order that maximizes Johansen statistics |
list.lags |
A list of all the possible lag orders and their corresponding Johansen Statistics. Note that the value when lag order is one is NA since lag order must bigger than 2. |
Fan Yang
Johansen, S. (1988), Statistical Analysis of Cointegration Vectors, Journal of Economic Dynamics and Control, 12, 231–254.
data(benchmark) x = seq(1, 6689, by = 23) ## monthly data global = data.frame(benchmark[x, 2:4]) optimlag(global, 15, "none")