nse.spec0: The spectral density at zero.

Description Usage Arguments Details Value References Examples

Description

Calculate the variance of the mean with the spectrum at zero estimator.

Usage

1
2
nse.spec0(x, method = c("AR", "bartlett", "wosa", "tukey"),
  prewhite = FALSE, max.length = 200)

Arguments

x

A numeric vector.

method

A character string denoting the method to use in estimating the spectral density function

prewhite

Prewhite the serie before analysis

max.length

maximum sample size for aggregation

Details

This is a wrapper around spectrum0.ar from the CODA package, SDF from the sapa package, psdcore from the PSD package and mcsefrom the mcmcse package.

Value

The variance estimator.

References

Plummer, Martyn, et al. "CODA: Convergence diagnosis and output analysis for MCMC." R news 6.1 (2006): 7-11.

D.B. Percival and A. Walden "Spectral Analysis for Physical Applications: Multitaper and Conventional Univariate Techniques". Cambridge University Press (1993).

Barbour, A. J. and R. L. Parker (2014), "psd: Adaptive, sine multitaper power spectral density estimation for R", Computers & Geosciences Volume 63 February 2014 : 1-8

James M. Flegal, John Hughes and Dootika Vats. (17-08-2015). mcmcse: Monte Carlo Standard Errors for MCMC. R package version 1.1-2. Riverside, CA and Minneapolis, MN.

Examples

1
2
3
4
5
6
7
8
9
n = 1000
ar = c(0.9)
mean = c(1)
sd = c(10)
 
Ts1 = as.vector(arima.sim(n = n, list(ar = ar), sd = sd) + mean)
 
nse::nse.spec0(x = Ts1, method = "AR", prewhite = FALSE)
 

AmurG/nse documentation built on May 5, 2019, 4:56 a.m.