The following example uses a data set containing the number of monthly air passengers in thousands of passengers from 1949 until 1960. The data is from Box, Jenkins, and Reinsel, as noted in the references below.
First step is to import the data:
>
|
|
The first column lists annual dates and the second column lists number of monthly passengers for those dates. The first row is a header containing column names.
To work with this data using the TimeSeriesAnalysis package, construct a TimeSeries object. Such an object can contain one or more data sets, measured at a common set of time points, as well as data headers and other metadata. You can construct this time series object as follows:
>
|
|
>
|
|
This data can be plotted using the TimeSeriesPlot command: