plotVar: Plot of the variance factor of the loess or stl fits at each...

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Trellis plot of the values of the variance factor of the loess or stl fits at each design point.

Usage

1
2
3
plotVar(op, ylab = "variance", xlab = "x", 
   panel = var.panel, auto.key = 
   list(lines = TRUE, points = FALSE, columns = 3), ...)

Arguments

op

object of class "op", "stlop", or "opblend"

ylab, xlab, panel, auto.key, ...

trellis plotting parameters

Details

If op is of class "op", then the values of op\$var are plotted. If op is of class "opblend", the variance of the two fits and the blended variance are overplotted. If op is of class "stlop", the variance for the fitted values, trend, and seasonal components are overplotted.

Value

an object of class "trellis"

Author(s)

Ryan Hafen

References

R. B. Cleveland, W. S. Cleveland, J.E. McRae, and I. Terpenning (1990) STL: A Seasonal-Trend Decomposition Procedure Based on Loess. Journal of Official Statistics, 6, 3-73.

W.S. Cleveland, E. Grosse and W.M. Shyu (1992) Local regression models. Chapter 8 of Statistical Models in S eds J.M. Chambers and T.J. Hastie, Wadsworth & Brooks/Cole.

See Also

stl2

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
n <- 200
L1 <- loessOp(n, span=91, degree=2, at=c(-9:(n+10)))
L2 <- loessOp(n, span=45, degree=0, at=c(-9:(n+10)))
Lb <- opBlend(L1, L2, n.b=50, blend.p=0.5)

p <- plotVar(L1)
p
plotVar(L2, ylim=p$y.limits)
plotVar(Lb)

sop <- stlOp(50, n.p=7, s.window="periodic", s.degree=1, n.ahead=7)
plotVar(sop)
plotVar(sop$S)

hafen/operator documentation built on May 17, 2019, 2:23 p.m.