longrun_variance — long run variance of a stationary series
LR = longrun_variance(X,kern,bandwitch)
X = vector of observations
kern =
- 'qs' for Quadratic Spectral (Defaut)
- 'b' for Bartlett
bandwitch =
-'n' (Default) for the Newey West (1994)'s non parametric bandwitch parameter
-'a' for the Andrews (1991) automatic bandwitch parameter selection with AR(1) structure
LR a results tlist with:
- LR('meth') = 'lr variance'
- LR('omega') = Long run variance of X
- LR('kernel') = kernel function
- LR('bandwitch') = Method to fix the bandwitch parameter
- LR('h') = Value of bandwitch parameter
1)kern(x,'qs','n') 2)LRV_func = longrun_variance(residual(:,i),kern,bandwitch) Example 1 provides the Standard Newey-West estimate of the long-run variance with a floor (4*(T/100)^(2/25)) window width (equivalent to newey_west(x,(4*(T/100)^(2/25)))) Example 2 is taken from function Moon_Perron.