nse.cos: Long-run variance estimation using low-frequency cosine...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/nse.R

Description

Function which calculates the numerical standard error with low-frequency cosine weighted averages of the original serie.

Usage

1
nse.cos(x, q = 12, lag.prewhite = 0)

Arguments

x

A numeric vector.

q

Number of consine series.

lag.prewhite

Prewhite the series before analysis (integer or NULL). When lag.prewhite = NULL this performs automatic lag selection. Default is lag.prewhite = 0 that is no prewhitening.

Details

The method estimate the series with a linear regression using cosine low frequency series. It than derived the NSE from the coefficient of the cosine series (Ulrich and Watson, 2017).

Value

The NSE estimator.

Author(s)

David Ardia and Keven Bluteau

References

Muller, Ulrich K., and Mark W. Watson. (2015) Low-frequency econometrics. National Bureau of Economic Research, No. w21564.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
n    = 1000
ar   = 0.9
mean = 1
sd   = 1
set.seed(1234)
x = c(arima.sim(n = n, list(ar = ar), sd = sd) + mean)

nse.cos(x = x, q = 12, lag.prewhite = 0)
nse.cos(x = x, q = 12, lag.prewhite = NULL)

## End(Not run)

nse documentation built on April 26, 2021, 1:06 a.m.

Related to nse.cos in nse...