The R Project SVN R

Rev

Rev 29542 | Rev 41621 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29542 Rev 30449
Line 69... Line 69...
69
z <- window(z[,1:3], end = c(1969,12))
69
z <- window(z[,1:3], end = c(1969,12))
70
plot(z, type = "b")    # multiple
70
plot(z, type = "b")    # multiple
71
plot(z, plot.type="single", lty=1:3, col=4:2)
71
plot(z, plot.type="single", lty=1:3, col=4:2)
72
 
72
 
73
## A phase plot:
73
## A phase plot:
74
data(nhtemp)
-
 
75
plot(nhtemp, c(nhtemp[-1], NA), cex = .8, col="blue",
74
plot(nhtemp, c(nhtemp[-1], NA), cex = .8, col="blue",
76
     main = "Lag plot of New Haven temperatures")
75
     main = "Lag plot of New Haven temperatures")
77
## a clearer way to do this would be
76
## a clearer way to do this would be
78
\dontrun{
77
\dontrun{
79
plot(nhtemp, lag(nhtemp, 1), cex = .8, col="blue",
78
plot(nhtemp, lag(nhtemp, 1), cex = .8, col="blue",
80
     main = "Lag plot of New Haven temperatures")
79
     main = "Lag plot of New Haven temperatures")
81
}
80
}
82
 
81
 
83
data(sunspots)
-
 
84
## xy.lines and xy.labels are FALSE for large series:
82
## xy.lines and xy.labels are FALSE for large series:
85
plot(lag(sunspots, 1), sunspots, pch = ".")
83
plot(lag(sunspots, 1), sunspots, pch = ".")
86
 
84
 
87
data(EuStockMarkets)
-
 
88
SMI <- EuStockMarkets[, "SMI"]
85
SMI <- EuStockMarkets[, "SMI"]
89
plot(lag(SMI,  1), SMI, pch = ".")
86
plot(lag(SMI,  1), SMI, pch = ".")
90
plot(lag(SMI, 20), SMI, pch = ".", log = "xy",
87
plot(lag(SMI, 20), SMI, pch = ".", log = "xy",
91
     main = "4 weeks lagged SMI stocks -- log scale", xy.lines= TRUE)
88
     main = "4 weeks lagged SMI stocks -- log scale", xy.lines= TRUE)
92
}
89
}