triroky <- read.table("telia-3roky.data", col.names=c("utime","bps")) summary(triroky) attach(triroky) unique(diff(utime)) toff <- (utime - utime[1])/604800 plot(toff, bps, main="Public Internet Praha", xlab="time [week]", ylab="traffic [b/s]", type="l") rada <- ts(bps, start=c(2005,26), freq=52) summary(rada) rozklad<-stl(rada, s.window="periodic") plot(rozklad) rozklad$time.series rozklad$time.series[,3] acf(rozklad$time.series[,3]) bps.ma<-filter(bps, filter=rep(1/52, 52)) plot(bps, type="l") lines(bps.ma, col="blue") bps.4<-filter(bps, filter=rep(1/4, 4)) lines(bps.4, col="red") past <- window(rada, end=2007.5) plot(past) future <- window(rada, start=2007.5) alpha<-0.2 model <- HoltWinters(past, alpha=alpha, beta=0, gamma=0) pred<-predict(model, n.ahead=50) plot(model, predicted.values = pred) (Rmodel<-HoltWinters(rada)) pred<-predict(model, n.ahead=50) plot(model, predicted.values=pred)