Learn R Programming

quantspec (version 1.0-0)

plot-KernelWeight: Plot the values of the KernelWeight.

Description

Creates a plot visualizing the weights $W_n(\omega)$ [cf. KernelWeight-class] that are used to estimate the quantile spectral density.

Usage

## S3 method for class 'KernelWeight,missing':
plot(x, y, ylab = expression(W[n](omega)),
  xlab = expression(omega), main = x@descr, ...)

Arguments

x
The KernelWeight to plot.
y
missing arg from the generic; will be ignored.
xlab
label for the x-axis; optional
ylab
label for the y-axis; optional
main
titel (on top) of the plot; optional
...
optional parameters used for plotting

Value

Details

In the plot the values at the frequencies $2\pi j / N$, $j=L+1-N,\ldots,L$, $L:=\lfloor N/2 \rfloor$ are shown, where $N$ is the parameter specified on construction of the object or $N := 3$, if that parameter was smaller than three. A warning is given in the later case.

Examples

Run this code
plot(kernelWeight(W1, bw=0.3),
       ylab=expression(W[n](x)),
       xlab=expression(x),
       main="Weights to an Epanechnikov kernel", sub="bw=0.3")

Run the code above in your browser using DataLab