R Dataset / Package datasets / AirPassengers

Submitted by pmagunia on March 9, 2018 - 1:06 PM
Dataset License
GNU General Public License v2.0
Attachment Size
dataset-58057.csv 2.51 KB
Documentation

Monthly Airline Passenger Numbers 1949-1960

Description

The classic Box & Jenkins airline data. Monthly totals of international airline passengers, 1949 to 1960.

Usage

AirPassengers

Format

A monthly time series, in thousands.

Source

Box, G. E. P., Jenkins, G. M. and Reinsel, G. C. (1976) Time Series Analysis, Forecasting and Control. Third Edition. Holden-Day. Series G.

Examples

## Not run: 
## These are quite slow and so not run by example(AirPassengers)## The classic 'airline model', by full ML
(fit <- arima(log10(AirPassengers), c(0, 1, 1),
              seasonal = list(order = c(0, 1, 1), period = 12)))
update(fit, method = "CSS")
update(fit, x = window(log10(AirPassengers), start = 1954))
pred <- predict(fit, n.ahead = 24)
tl <- pred$pred - 1.96 * pred$se
tu <- pred$pred + 1.96 * pred$se
ts.plot(AirPassengers, 10^tl, 10^tu, log = "y", lty = c(1, 2, 2))## full ML fit is the same if the series is reversed, CSS fit is not
ap0 <- rev(log10(AirPassengers))
attributes(ap0) <- attributes(AirPassengers)
arima(ap0, c(0, 1, 1), seasonal = list(order = c(0, 1, 1), period = 12))
arima(ap0, c(0, 1, 1), seasonal = list(order = c(0, 1, 1), period = 12),
      method = "CSS")## Structural Time Series
ap <- log10(AirPassengers) - 2
(fit <- StructTS(ap, type = "BSM"))
par(mfrow = c(1, 2))
plot(cbind(ap, fitted(fit)), plot.type = "single")
plot(cbind(ap, tsSmooth(fit)), plot.type = "single")## End(Not run)
--

Dataset imported from https://www.r-project.org.

Documentation License
GNU General Public License v2.0

From Around the Site...

Title Authored on Content type
R Dataset / Package DAAG / humanpower1 March 9, 2018 - 1:06 PM Dataset
R Dataset / Package boot / nodal March 9, 2018 - 1:06 PM Dataset
R Dataset / Package Stat2Data / BirdNest March 9, 2018 - 1:06 PM Dataset
anscombe February 26, 2017 - 11:28 AM Dataset
R Dataset / Package cluster / animals March 9, 2018 - 1:06 PM Dataset