<< lag Basic functions matdiv >>

Grocer >> Basic functions > longrun_variance

longrun_variance

long run variance of a stationary series

CALLING SEQUENCE

LR = longrun_variance(X,kern,bandwitch)

PARAMETERS

Input

• 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

Output

• 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

DESCRIPTION

Estimates the long run variance of a stationary series.

EXAMPLE

load(GROCERDIR+'/data/bdhenderic.dat')
l=longrun_variance(series(delts(lm1)),'qs','n')
h=l('h')
// 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)))) 

LRV_func = longrun_variance(residual(:,i),kern,bandwitch)
//example taken from function Moon_Perron

AUTHOR

Christophe Hurlin 2004 / Eric Dubois 2008

Report an issue
<< lag Basic functions matdiv >>