Learn R Programming

PANICr (version 0.0.0.2)

nw: Bandwidth selection

Description

This function at fixk 0 finds the bandwidth, or lag length, of the short, long, and run variance of a residual.

Usage

nw(v,fixk)

Arguments

v
A Vector of error terms from a factor model
fixk
If fixk is 0, then this function will perform automatic bandwidth selection. Otherwise, the integer placed here will be the selected bandwidth.

Value

  • k An integer that is the bandwidth chosen by nw()

    w The vector of long run variance

References

Moon, R. & B. Perron (2004) Testing for a unit root in panels with dynamic factors. Journal of Econometrics 122, 81-126.