In this video lecture, we'll talk about some time plots.
So what are the objectives of this video lecture?
We will see some examples of time series and
we'll try to produce some meaningful time plots.
Those are the objectives of this lecture.
We will look at a few time series data from the package astsa,
to be specific, we'll look at the following data set that's titled jj,
flu and so forth on astsa.
I'm going to talk about each one of them in detail.
So first data said the time shares we want to look at is
the time series about the Johnson and Johnson Quarterly Earnings.
If the Johnson and Johnson is a US company and we're going to look at
the quarterly earnings for 84 quarters starting from 1964,
the first quarter to 1980, the last quarter.
And it's titled jj in the package ASA.
At this point I'll assume that you have already installed
package called ASOS Toyer Machine.
If you have not done refer to one of the videos where Bill
is talking about installing those packages on to your own machine.
I'm just going to use that package also now.
So I'm just going to use require Astsa so that I can use it.
Now that I have asta in my shell, I'm going to look at this documentation
and the documentation says that this includes data and
scripts that accompany to the book by and Stoffer.
We'll be looking at the quarterly earnings of Johnson and Johnson.
The data set, the timesheet is called jj.
If I just say help(jj), documentation says that this is Johnson and
Johnson quarterly earnings per share.
It's collected 21 years starting from 1960 to 1980.
It is already a time sense object.
Which means I do not use to use this TS routine or
TS operator to make the data a time series.
So, it is already a time series.
It already starts upon 1960.
So all I have to do is basically put some meaningful title and
x label and y label into my plot command.
So basically here what I have is that I'm going to plot jj, since jj is already
a time series object, I do not need to write this plot.ts.
And I'm going to use type o,
which means every point in the time series will have a little circle on it and
the title I put is the Johnson&Johnson quarterly earnings per share,
this is a string that goes into the main, that becomes a title.
For the y axis label we put, let's say earnings, and
x label If I once come in, I will obtain this time plot.
And I have nice title, y label, x label.
This first step in analysis of a time series is basically
to produce the point plot,
because by just looking at the time plot, it gives you an idea of what's going on.
By just looking at this time plot, I would say there's some kind of trend
Throughout the years, so definitely there's an increase throughout the years.
I can see the trend, but I can also see fluctuations,
the seasonal variations on that trend.
So there is a seasonal effect in this time series.
There is some kind of a trend, but one other thing I realize is the following.
At the beginning, my time series data At the beginning
the variation is not that much.But the leg room I have a higher variations.
Now later on we will see that if we have a transitional affect or
if you have a different variation different parts of the time series.
It actually violates so-called stationary principle, which I will talk about
next For now, we'll produce the time plot, we have an idea what's going on.
Next time series is about pneumonia and influenza.
That's in the US from 1968 to 1978, so this is a 11 year period.
And they basically recorded the monthly deaths per 10,000 people.
So this data is called flu with ASA at the time series.
Let's look at the time plot.
Before I do that I am going to say health flu so
that I can get an idea of I can get the documentation about this flu.
It actually says the monthly Pneumonia and
influenza deaths in the US from 1968 to 1978.
And it is per, that's number of deaths per 10,000 people monthly for 11 years.
It is already a time series object which means
I do not have to deal with ts operator here either.
And it starts from 1968.
It ends at 1979.
Flu, The plot flu data.
And I put the sum title.
And a y label, an x label.
And we obtained the following time plot.
In this time plot, we see that there is some kind of seasonality going on.
There is a peak every after year or so.
And that kind of shows that there is some kind of systality
going on in this data which is definitely not a stationary time
series which I will talk about in the next lecture.
But if you look at the over all trend, there might be a trend that
overall number of tasks going down which might hard to see.
But okay, so this is the time plot for flu data.
The next time stretch we're going to look at is called globtemp.
It is about land-ocean temperature.
The global mean land-ocean temperature and they're recorded how much land-ocean
global temperature, mean temperature, is deviating from some base temperature.
And that base temperature is taking the average from 1951 til 1980.
So that's our average.
That's our base temperature.
And we'll look at the deviations from that temperature and
data is collected from 1880 til 2015.
And the source is actually NASA.
So I say plot globtemp and I put a title and
the y label, an x label and I plot it.
I see time plot.
Basically from this time plot my first impression is that
there is some kind of trend.
So temperature deviations are going up.
And even though there is a trend, there's some kind of seasonality on that trend
as well, probably, because of the seasons of the year.
Next time series is the land only temperature deviations, so
this idea is the same.
It is between 1880 to 2015.
It is a game temperature deviations which is measured in centigrade from
the base temperature.
But this is for lab only.
So go ahead at this point try to obtain your own meaningful time plot for
the data set called global temp L in ASA.
The last time series that we'll look in this lecture is called Star.
It is about the magnitude of a star at midnight which is collected for
600 consecutive days.
This data is from ASA packet, but if you look at the documentation using
the health star, it is actually from the book by Whittaker and Robinson
called The Calculus of Observations, a Treatise on Numerical Mathematics.
So we plot star data, and y label and x label,
and we opting following, time plot which definitely
shows us there is some kind of seasonality going on.
We can see some periodicity in this time plot.
So what have you learned in this lecture?
You have learned that time series exist in a variety of areas starting from
financial world, ended up with astrophysics.
And you have learned how to produce meaningful time plots.