# nse.cos: Long-run variance estimation using low-frequency cosine... In nse: Numerical Standard Errors Computation in R

 nse.cos R Documentation

## Long-run variance estimation using low-frequency cosine series.

### Description

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

### Usage

```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

```## 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 Nov. 10, 2022, 5:52 p.m.