The R Project SVN R

Rev

Rev 18718 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18718 Rev 20445
Line 1... Line 1...
1
library(ts)
1
library(ts)
-
 
2
.proctime00 <- proc.time()
-
 
3
 
2
### ar
4
### ar
3
data(lh)
5
data(lh)
4
ar(lh)
6
ar(lh)
5
ar(lh, method = "burg")
7
ar(lh, method = "burg")
6
ar(lh, method = "ols")
8
ar(lh, method = "ols")
Line 117... Line 119...
117
ap <- log10(AirPassengers) - 2
119
ap <- log10(AirPassengers) - 2
118
(fit <- StructTS(ap, type= "BSM"))
120
(fit <- StructTS(ap, type= "BSM"))
119
par(mfrow=c(1,2))
121
par(mfrow=c(1,2))
120
plot(cbind(ap, fitted(fit)), plot.type = "single")
122
plot(cbind(ap, fitted(fit)), plot.type = "single")
121
plot(cbind(ap, tsSmooth(fit)), plot.type = "single")
123
plot(cbind(ap, tsSmooth(fit)), plot.type = "single")
-
 
124
 
-
 
125
cat('Time elapsed: ', proc.time() - .proctime00,'\n')