Presentation is loading. Please wait.

Presentation is loading. Please wait.

Time Trends Simplest time trend is a linear trend Examine National Population data set. How well does a linear model work? Did you examine the residuals.

Similar presentations


Presentation on theme: "Time Trends Simplest time trend is a linear trend Examine National Population data set. How well does a linear model work? Did you examine the residuals."— Presentation transcript:

1 Time Trends Simplest time trend is a linear trend Examine National Population data set. How well does a linear model work? Did you examine the residuals plots?

2 Time Trends Examine National Population data set. Make a prediction of U.S. Population in year 2011. Comment on your prediction.

3 Time Trends Recall: Difference between the 95% CI and the 95% PI Confidence interval of the prediction: Represents a range that the mean response is likely to fall given specified settings of the predictors. Prediction Interval: Represents a range that a single new observation is likely to fall given specified settings of the predictors.

4 Time Trends Simplest time trend is a linear trend Examine World Population data set. Notice there is not data for each year! How can you make an appropriate time series plot? How well does a linear model work? Did you examine the residuals plots?

5 Time Trends Examine World Population data set. Is there a model that might work better than a linear model? How can you use linear regression with a non-linear model?

6 Time Trends Using Time Series Trend Analysis in Minitab Examine the U.S. population data set again.

7 Time Trends – Economics Example Open HSEINV data set invpc is real per capita housing investment in thousands of dollars price is housing price index Do invpc and price exhibit linear trends through time? Are invpc and price linearly related to each other?

8 Time Trends – Economics Example

9

10

11

12

13 Time Trends – Fertility Rate Example Again!

14

15 But wait, gfr does not follow a strictly linear trend through time:

16 Time Trends – Fertility Rate Example Again!

17 But wait, gfr does not follow a quadratic trend through time:

18 Time Trends – Fertility Rate Example Again!

19 Adding more polynomial terms in t allows us to model any time series pretty well. But, Model gets overly complicated We are just playing “connect-the-dots” and missing broad trends in the data This offers little help in finding important explanatory variables

20 Time Trends – Cheese!

21

22 Stationary Time Series Definition: A stationary time series process is one in which the probability distribution(s) that generate the time series are stable over time. In other words, if we take any consecutive collection of random variables in the series and shift it ahead or back h time periods, the probability distribution(s) remain unchanged.

23 Stationary Time Series – Example Pharmaceutical Product Sales

24 Stationary Time Series – Example How do we know Pharmaceutical Product Sales is a stationary process? Things to examine: No time effect Lag scatter plots Sample Autocorrelation Function (ACF)

25 Stationary Time Series – Example Lets examine time effect in the Pharmaceutical Product Sales data How do we do this?

26 Lets examine time effect in the Pharmaceutical Product Sales data How do we do this? Regress the data against time (or maybe time and time squared)

27 Pharmaceutical Product Sales regressed against time (week) Sales, in Thousands = 10368 + 0.184 Week Predictor Coef SE Coef T P Constant 10368.0 40.1 258.58 0.000 Week 0.1844 0.5751 0.32 0.749 S = 218.244 R-Sq = 0.1% R-Sq(adj) = 0.0% NO TIME EFFECT

28 Pharmaceutical Product Sales regressed against time (week) and time squared Sales, in Thousands = 10405 - 1.62 Week + 0.0149 Week Squared Predictor Coef SE Coef T P Constant 10404.6 60.9 170.93 0.000 Week -1.618 2.322 -0.70 0.487 Week Squared 0.01490 0.01859 0.80 0.425 S = 218.576 R-Sq = 0.6% R-Sq(adj) = 0.0% NO TIME EFFECT

29 Pharmaceutical Product Sales has no time effect. What does no time effect imply – constant mean Estimate the constant mean of the Pharmaceutical Product Sales data.

30 Stationary Time Series – Example Lets examine lag scatter plots with the Pharmaceutical Product Sales data. Make new lag plus 1 variable in Minitab Make scatter plot of data vs. lag plus 1

31 Scatter plot of data vs. lag plus 1 What does this graph imply?

32 Stationary Time Series – Example Can explore other lags Make new lag plus 2 variable in Minitab Make scatter plot of data vs. lag plus 2

33 Scatter plot of data vs. lag plus 2 What does this graph imply?

34 Stationary Time Series – Example Lets examine the Sample Autocorrelation Function What is an autocorrelation function?

35

36

37

38 What is a covariance? covariance is a measure of how much two random variables change together.

39 What is a covariance? If the greater values of one variable mainly correspond with the greater values of the other variable, the covariance is a positive number. If the greater values of one variable mainly correspond to the smaller values of the other, the covariance is negative. The sign of the covariance therefore shows the tendency in the linear relationship between the variables.

40 Stationary Time Series – Example Lets examine the Sample Autocorrelation Function Minitab will estimate the Autocorrelation Function from a set of time series data – the Sample Autocorrelation Function

41 Stationary Time Series – Example For the pharmaceutical product sales data: Lag ACF T LBQ 1 0.112486 1.23 1.56 2 0.012543 0.14 1.58 3 -0.223825 -2.42 7.84 4 -0.193314 -2.00 12.56 5 -0.113943 -1.14 14.21 6 0.014538 0.14 14.24 7 0.078927 0.78 15.05 8 0.045591 0.45 15.32 9 0.000628 0.01 15.32

42 Stationary Time Series – Example The graph is usually more useful

43 Stationary Time Series – Example Open Stationary Time Series Example data set and explore the following Time effect present? What do lag scatter plots tell us? What does ACF tell us? Is this data set a stationary time series?

44 Stationary Time Series – Example Open Cheese data set and explore the following Time effect present? What do lag scatter plots tell us? What does ACF tell us? Is this data set a stationary time series?


Download ppt "Time Trends Simplest time trend is a linear trend Examine National Population data set. How well does a linear model work? Did you examine the residuals."

Similar presentations


Ads by Google