| plot.FEXP | R Documentation | 
(S3) methods for the generic functions plot (and
lines)   applied to fractional EXP (FEXP) and
"WhittleEst" (FEXPest,
models.
plot() plots the data periodogram and the ‘FEXP'’ model
estimated spectrum, where lines() and does the latter.
## S3 method for class 'FEXP'
plot(x, log = "xy", type = "l",
      col.spec = 4, lwd.spec = 2, xlab = NULL, ylab = expression(hat(f)(nu)),
      main = paste(deparse(x$call)[1]), sub = NULL, ...)
## (With identical argument list:)
## S3 method for class 'WhittleEst'
plot(x, log = "xy", type = "l",
      col.spec = 4, lwd.spec = 2, xlab = NULL, ylab = expression(hat(f)(nu)),
      main = paste(deparse(x$call)[1]), sub = NULL, ...)
## S3 method for class 'FEXP'
      lines(x, type = "l", col = 4, lwd = 2, ...)
## S3 method for class 'WhittleEst'
lines(x, type = "l", col = 4, lwd = 2, ...)
| x | an R object of  | 
| log | character specifying log scale should be used, see
 | 
| type | plot type for the periodogram, see  | 
| col.spec,lwd.spec,col,lwd | graphical parameters used for drawing the
estimated spectrum, see  | 
| xlab,ylab,main,sub | labels for annotating the plot, see
 | 
| ... | further arguments passed to  | 
Martin Maechler
FEXPest, WhittleEst;
plot.default and spectrum.
data(videoVBR)
fE <- FEXPest(videoVBR, order = 3, pvalmax = .5)
plot(fE)
fE3 <- FEXPest(videoVBR, order = 3, pvalmax = 1)#-> order 3
lines(fE3, col = "red3", lty=2)
f.GN    <- WhittleEst(videoVBR)
f.am21  <- WhittleEst(videoVBR, model = "fARIMA",
                      start= list(H= .5, AR = c(.5,0), MA= .5))
lines(f.GN,   col = "blue4")
lines(f.am21, col = "goldenrod")
##--- Using a tapered periodogram ---------
spvVBR <- spec.pgram(videoVBR, fast=FALSE, plot=FALSE)
fam21 <- WhittleEst(periodogr.x = head(spvVBR$spec, -1),
                    n = length(videoVBR), model = "fARIMA",
                    start= list(H= .5, AR = c(.5,0), MA= .5))
fam21
f.am21 # similar but slightly different
plot(fam21)
## Now, comparing to traditional ("log-X", not "log-log") spectral plot:
plot(fam21, log="y")
## compared to the standard R spectral plot : s
if(dev.interactive(TRUE)) getOption("device")()# a new graphics window
plot(spvVBR, log = "yes", col="gray50")
all.equal(.ffreq(fE$n) / (2*pi) -> ffr.,
          head(spvVBR$freq, -1))# TRUE
lines(ffr., fam21$spec, col=4, lwd=2)
## need to adjust for different 'theta1':
lines(ffr., f.am21$spec * fam21$theta1 / f.am21$theta1,
      col = adjustcolor("tomato", 0.6), lwd=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.