#
# 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.
Run the code above in your browser using DataLab