plot.spectrum.test: Plot of the Permutation-Spectrum Test

Description Usage Arguments Examples

View source: R/plot.spectrum.test.R

Description

This function generates a dual plot showing the results of the permutation-spectrum testusing either ggplot or base graphics. The user must input a test object produced by the spectrum.test function. The function produces a dual plot showing the scaled intensity of the time-series vector and the simulated null distribution of the maximum scaled intensity under the null hypothesis of an IID vector. The plots also report the value of the maximum scaled intensity and the resulting p-value for the test. This dual plot forms a useful companion to the permutation-spectrum test; it allows the user to visualise the simulated null distribution and test statistic.

Usage

1
2
## S3 method for class 'spectrum.test'
plot(x, ggplot = TRUE, print = TRUE, ...)

Arguments

x

A spectrum.test object produced by the spectrum.test function

ggplot

Logical; if TRUE the scatterplot is a ggplot object; if FALSE it is a base plot object

print

Logical; if TRUE the scatterplot is printed

...

unused

Examples

1
2
3
4
5
data(garma)

#Show the intensity of a time-series vector
TEST <- spectrum.test(SERIES1, sims = 100)
plot(TEST)

ts.extend documentation built on Nov. 15, 2020, 1:06 a.m.