View source: R/internal_psdsPlot_s3.R
image.psds | R Documentation |
This function produces a spectogram from a psds object.
## S3 method for class 'psds'
image(x, func = "median", logZ = TRUE, zoomFreq = c(0, 1), fs = 16384, ...)
x |
an object of class psds |
func |
statistics to be applied to |
logZ |
logical value (default is TRUE) to determine if the PSD should be on log scale |
zoomFreq |
interval which specifies the frequency axis to be plotted, for instance, c(0.2, 0.7) leaves out the 20% and 30% of the low and high frequencies, respectively. The default value is c(0,1), i.e., all the frequencies |
fs |
sampling frequency |
... |
other graphical parameters from the image.plot function |
plot of the estimate of the (log) spectrum
gibbs_pspline
## Not run:
set.seed(1)
# Generate AR(1) data with rho = 0.9
n = 128
data = arima.sim(n, model = list(ar = 0.9));
data = data - mean(data);
# Spectrum estimate via p-splines
spec = spec_pspline(data, l=30, p=20, Ntotal1=3000, burnin1=1000, thin1=10,
Ntotal=3000, burnin=1000, thin=10, k=30);
image(spec) # Plot log PSD (see documentation of iplot.psds)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.