Class 12. Time series models.
What you need to have learnt from Class 11: Logistic regression.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Logistic regression. Modeling transformed probabilities. Which
transform - the logit.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Can you parse the output? Bulk Pack p.320.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
-
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
-
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- 1. The overall test in logistic regression. Is anything going
on, are any (any combination) of the predictors useful in
predicting Y (the logits of the probabilities)? In this case the
small p-value indicates that this
is the case.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- 2. Is a specific coefficient significant (useful) after having
controlled for the other variables in the model. The small p-value
says this is indeed the case.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- 3. What does the 2.82 tell you?
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/blueball.gif)
- For every 1 unit change in price diff the logit of the probability
of buying CH changes by 2.82. (controlling for loyal ch and store 7.)
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/blueball.gif)
- BETTER. For every one unit (ie a dollar) change in
price diff the
odds of buying CH changes by a multiplicative factor of exp(2.82)
= 16.8.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Key calculation. At Loyal CH of 0.8, price diff of 20 cents
and product sold in store 7, predict the probability of buying CH?
1. Find the logit. logit = -3.06 + 6.32 * 0.8 + 2.82 * 0.2 + 0.35
= 2.91.
2. Probability = exp(logit)/(1 + exp(logit)) = exp(2.91)/(1 + exp(2.91))
= 0.948.
New material for today: Regression for time series.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Objective: model a time series.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Example: Model default rates on mortgages as a function of
interest rates.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Problem: Time series often have autocorrelated error
terms which violates the standard assumption of independence.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Definition: Autocorrelation - successive error terms are
dependent (see p.46 of the Bulk Pack).
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Diagnostics.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Key graphic - residuals plotted against time. Tracking in the
residual plots.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Look at the Durbin-Watson statistic. Less than 1.5 or over 2.5
suggests a problem.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Correlation of the residuals is roughly 1 - DW/2.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Consequences of positive autocorrelation:
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Over-optimistic about the information content in the data.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Standard errors for slopes too small, confidence intervals too
narrow.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Think variables are significant when really they are not.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- False sense of precision.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Fix ups.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Use differences of both Y and X, not raw data (pp.349-350).
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Include lagged residuals in the model (pp. 334-336).
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Include lag Y in the model (as an X-variable p.358).
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/greenball.gif)
- Benefits of differencing.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Often reduces autocorrelation.
![*](http://compstat.wharton.upenn.edu:8001/~waterman/icons/yellowball.gif)
- Can reduce collinearity between X-variables.
Richard Waterman
Fri Oct 18 11:27:42 EDT 1996