polspline (version 1.1.19)

plot.lspec: Lspec: logspline estimation of a spectral distribution

Description

Plots a spectral density function, line spectrum, or spectral distribution from a model fitted with lspec

Usage

# S3 method for lspec
plot(x, what = "b", n, add = FALSE, xlim, ylim, xlab = "", ylab = "",
type, ...)

Arguments

x

lspec object, typically the result of lspec.

what

what should be plotted: b (spectral density and line spectrum superimposed), d (spectral density function), l (line spectrum) or p (spectral distribution function).

n

the number of equally spaced points at which to plot the fit; default is max(100,fit\$sample).

add

indicate that the plot should be added to an existing plot.

xlim

X-axis plotting limits: default is \(c(0,\pi)\), except when what = "p", when the default is \(c(-\pi,\pi)\).

ylim

Y-axis plotting limits.

xlab,ylab

axis labels.

type

plotting type; default is "l" when what = "d" and what = "p", "h" when what = "l", and a combination of "h" and "l" when what ="b"

...

all regular plotting options are passed on.

References

Charles Kooperberg, Charles J. Stone, and Young K. Truong (1995). Logspline Estimation of a Possibly Mixed Spectral Distribution. Journal of Time Series Analysis, 16, 359-388.

Charles J. Stone, Mark Hansen, Charles Kooperberg, and Young K. Truong. The use of polynomial splines and their tensor products in extended linear modeling (with discussion) (1997). Annals of Statistics, 25, 1371--1470.

See Also

lspec, summary.lspec, clspec, dlspec, plspec, rlspec.

Examples

Run this code
# NOT RUN {
data(co2)
co2.detrend <- lm(co2~c(1:length(co2)))$residuals
fit <- lspec(co2.detrend)
plot(fit)
# }

Run the code above in your browser using DataCamp Workspace