cumperiod | R Documentation |
Computes cumulative normalized periodogram.
cumperiod(x)
x |
The time series you wish to compute the cumulative normalized periodogram. |
Does as the title suggests
A list containing the following two components:
wp |
The Fourier frequencies where the cumulative normalized periodogram is evaluated at |
cumperiod |
The cumulative normalized periodogram. |
Code was based on Professor Newton's explanation
G. P. Nason
Bartlett, M.S. (1967) Some Remarks on the Analysis of Time-Series. J. R. Statist. Soc. B, 54, 25-38.
Link to Professor H. Joseph Newton's web page on Bartlett's test
Nason, G.P. and Savchev, D. (2014) White noise testing using wavelets. Stat, 3, 351-362. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1002/sta4.69")}
bartlettB.test
, compute.rejection
#
# Use example time series
#
x <- rnorm(100)
x.cp <- cumperiod(x)
#
# Can plot it, if you like
#
plot(x.cp$wp, x.cp$cumperiod, type="l", xlab="Frequency",
ylab="Cumulative Normalized Periodogram")
#
# You can try replacing the x by, say, an AR(1) using arima.sim and
# you'll get a very different shaped line, depending on the AR(1)
# parameter.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.