nse.cos | R Documentation |
Function which calculates the numerical standard error with low-frequency cosine weighted averages of the original serie.
nse.cos(x, q = 12, lag.prewhite = 0)
x |
A numeric vector. |
q |
Number of consine series. |
lag.prewhite |
Prewhite the series before analysis (integer or |
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).
The NSE estimator.
David Ardia and Keven Bluteau
Muller, Ulrich K., and Mark W. Watson. (2015) Low-frequency econometrics. National Bureau of Economic Research, No. w21564.
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.