### Time Series Example Datasets. ### 北京地区1949:1964年洪水受灾和成灾面积年度数据。 ### 来自: 何书元《应用时间序列分析》。 flood.data <- matrix(c( 1949 , 1 , 331.12 , 243.96 , 1950 , 2 , 380.44 , 293.90 , 1951 , 3 , 59.63 , 59.63, 1952 , 4 , 37.89 , 18.09, 1953 , 5 , 103.66 ,72.92, 1954 , 6 , 316.67 , 244.57, 1955 , 7 , 208.72 , 155.77, 1956 , 8 , 288.79 , 255.22, 1957 , 9 , 25.00 , 0.50, 1958 , 10 , 84.72 , 48.59, 1959 , 11 , 260.89 ,202.96, 1960, 12 , 27.18 ,15.02, 1961, 13 , 20.74 ,17.09, 1962 , 14 , 52.99 ,14.66, 1963 , 15 , 99.25 , 45.61, 1964 , 16 , 55.36 ,41.90), byrow=T, ncol=4, dimnames=list(1949:1964, c("year", "t", "area1", "area2"))) flood.area1 <- ts(flood.data[,"area1"], frequency=1, start=1949) flood.area2 <- ts(flood.data[,"area2"], frequency=1, start=1949) ### 某城市用煤季度数据。 ### 来自: 何书元《应用时间序列分析》。 coal.consumption <- ts(c( 6878.4 , 5343.7 , 4847.9 , 6421.9 , 6815.4 , 5532.6 , 4745.6 , 6406.2 , 6634.4 , 5658.5 , 4674.8 , 6445.5 , 7130.2 , 5532.6 , 4989.6 , 6642.3 , 7413.5 , 5863.1 , 4997.4 , 6776.1 , 7476.5 , 5965.5 , 5202.1 , 6894.1 ), frequency=4, start=c(1991,1)) ### 在R中已安装的时间列示例数据有美国泛美航空公司1949-1960 ### 的国际航班订票数的月度数据(单位:千人)。 data(AirPassengers) ### Maine 1996.1--2006.8失业率月度数据。 ### 来自:P.S.P. Cowpertwait, A.V. Metcalfe: ### Introductory Time Series with R tab <- read.table("../introtsa/Maine.dat", header=TRUE) y <- tab[['unemploy']] Maine <- ts(y, frequency=12, start=c(1996,1)) rm(y,tab) ### 美国 1996.1--2006.10失业率月度数据。 ### 来自:P.S.P. Cowpertwait, A.V. Metcalfe: ### Introductory Time Series with R tab <- read.table("../introtsa/USunemp.dat", header=TRUE) y <- tab[['USun']] USunemp <- ts(y, frequency=12, start=c(1996,1), end=c(2006,10)) rm(y,tab) ### 澳大利亚1958.1--1990.12的月度供电(百万千瓦时)、啤酒供应(百万升)、 ### 基于巧克力的产品产量(吨)的月度数据。 ### 三个序列分别为choc, beer, elec. ### 来自:P.S.P. Cowpertwait, A.V. Metcalfe: ### Introductory Time Series with R tab <- read.table("../introtsa/cbe.dat", header=TRUE) CBE <- ts(as.matrix(tab), frequency=12, start=c(1958,1), end=c(1990,12)) rm(tab) ### 英镑对新西兰元汇率1991.1--2000.3,季度数据(平均值) ### 来自:P.S.P. Cowpertwait, A.V. Metcalfe: ### Introductory Time Series with R tab <- read.table("../introtsa/pounds_nz.dat", header=TRUE) y <- tab[['xrate']] pounds.nz <- ts(y, frequency=4, start=c(1991,1), end=c(2000,1)) rm(y,tab) ### 全球气温数据。1856.1--2005.12,月度数据。 ### 数值为与1961--1990期间月平均值的差。 ### 来自:P.S.P. Cowpertwait, A.V. Metcalfe: ### Introductory Time Series with R y <- scan("../introtsa/global.dat", quiet=TRUE) Global.ts <- ts(y, start=c(1856,1), end=c(2005,12), frequency=12) rm(y)