STAT 3610/5610 * Time Series Analysis

Time Series Analysis – Chapter 6
Odds and Ends
Units Conversions
When variables are rescaled (units are
changed), the coefficients, standard errors,
confidence intervals, t statistics, and F
statistics change in ways that preserve all
measured effects and testing outcomes.
Beta Coefficients
A z-score is: 𝑧 =
π‘₯βˆ’π‘₯
𝑠
In a data set, the data for each regression
variable (independent and dependent) are
converted to z-scores. Then, the regression
is conducted.
Beta Coefficients – Example
Use the data set 4th Graders Feet
Regress foot length on foot width
The regression equation is
Foot Length = 7.82 + 1.66 Foot Width
Predictor
Coef SE Coef
Constant
7.817 2.938
Foot Width 1.6576 0.3262
T
P
2.66 0.011
5.08 0.000
S = 1.02477 R-Sq = 41.1% R-Sq(adj) = 39.5%
Beta Coefficients – Example
Use the data set 4th Graders Feet
Regress z-score of foot length on z-score of foot width
The regression equation is
zFoot Length = - 0.000 + 0.641 zFoot Width
Predictor
Coef
SE Coef
Constant
-0.0000 0.1245
zFoot Width 0.6411 0.1262
T P
-0.00 1.000
5.08 0.000
S = 0.777763 R-Sq = 41.1% R-Sq(adj) = 39.5%
Using the Log of a Variable
β€’ Taking the log usually narrows the
range of the variable – This can
result in estimates that are less
sensitive to outliers
Using the Log of a Variable
β€’ When a variable is a positive $
amount, the log is usually taken
β€’ When a variable has large integer
values, the log is usually taken:
population, total # employees,
school enrollment, etc…
Using the Log of a Variable
β€’ Variables that are measured in
years such as education,
experience, age, etc… are usually
left in original form
Using the Log of a Variable
β€’ Proportions or percentages are
usually left in original form because
the coefficients are easier to
interpret – percentage point
change interpretation.
Modeling a Quadratic Effect
β€’ Consider the quadratic effect dataset
β€’ Want to predict Millions of retained impressions per
week
β€’ Predictor is TV advertising budget, 1983 ($ millions)
Model is: π‘šπ‘–π‘™ = π›½π‘œ + 𝛽1 𝑠𝑝𝑒𝑛𝑑 + 𝑒
β€’ Consider the quadratic effect dataset
β€’
β€’
Want to predict Millions of retained impressions per week
Predictor is TV advertising budget, 1983 ($ millions)
The regression equation is
MIL = 22.2 + 0.363 SPEND
Predictor
Constant
SPEND
Coef
SE Coef
T
22.163
7.089
3.13
0.36317 0.09712 3.74
P
0.006
0.001
S = 23.5015 R-Sq = 42.4% R-Sq(adj) = 39.4%
β€’ Did you check your residuals plots?
β€’ Scatterplot – there is a quadratic effect
too!
Modeling a Quadratic Effect
β€’ Consider the quadratic effect dataset
β€’ Want to predict Millions of retained impressions per
week
β€’ Predictor is TV advertising budget, 1983 ($ millions)
β€’ Add the quadratic effect to the model
Model is: π‘šπ‘–π‘™ = π›½π‘œ + 𝛽1 𝑠𝑝𝑒𝑛𝑑 + 𝛽2 𝑠𝑝𝑒𝑛𝑑 2 + 𝑒
Model is: π‘šπ‘–π‘™ = π›½π‘œ + 𝛽1 𝑠𝑝𝑒𝑛𝑑 + 𝛽2 𝑠𝑝𝑒𝑛𝑑 2 + 𝑒
The regression equation is
MIL = 7.06 + 1.08 SPEND - 0.00399 SPEND SQUARED
Predictor
Coef
SE Coef
Constant
7.059
9.986
SPEND
1.0847
0.3699
SPEND SQUARED -0.003990 0.001984
T
P
0.71 0.489
2.93 0.009
-2.01 0.060
S = 21.8185 R-Sq = 53.0% R-Sq(adj) = 47.7%
β€’ Did you check your residuals plots?
Modeling a Quadratic Effect
The interpretation of the quadratic term, a, depends on
whether the linear term, b, is positive or negative.
The graph above and on the left shows an equation with a positive linear
term to set the frame of reference. When the quadratic term is also positive,
then the net effect is a greater than linear increase (see the middle graph).
The interesting case is when the quadratic term is negative (the right graph).
In this case, the linear and quadratic term compete with one another. The
increase is less than linear because the quadratic term is exerting a
downward force on the equation. Eventually, the trend will level off and head
downward. In some situations, the place where the equation levels off is
beyond the maximum of the data.
Quadratic Effect Example
β€’ Consider the dataset MILEAGE (on my
website)
β€’ Create a model to predict MPG
More on R2
β€’ R2 does not indicate whether
β€’ The independent variables are a true cause of the
changes in the dependent variable
β€’ omitted-variable bias exists
β€’ the correct regression was used
β€’ the most appropriate set of independent variables
has been chosen
β€’ there is collinearity present in the data on the
explanatory variables
β€’ the model might be improved by using transformed
versions of the existing set of independent variables
More on R2
β€’ But, R2 has an easy interpretation:
The percent of variability present in the
independent variable explained by the
regression.
Adjusted R2
β€’ Modification of R2 that adjusts for the number of
explanatory terms in the model.
β€’ Adjusted R2 increases only if the new term added to
the model improves the model sufficiently
β€’
This implies adjusted R2 can rise or fall after the addition
of a new term to the model.
Definition:
𝑅2
= 1 βˆ’ (1 βˆ’
π‘›βˆ’1
2
𝑅 )
π‘›βˆ’π‘βˆ’1
Where n is sample size and p is total number of
predictors in the model
Adjusted R2 – Example
β€’ Use MILEAGE data set
β€’ Regress MPG on HP, WT, SP
β€’
What is the R2 and the adjusted R2
β€’ Now, regress MPG on HP, WT, SP, and VOL
β€’
What is the R2 and the adjusted R2
Prediction Intervals
β€’ Use MILEAGE data set
β€’ Regress MPG on HP
β€’ We want to create a prediction of MPG at a HP of 200
β€’ Minitab gives:
New Obs Fit
SE Fit
95% CI
95% PI
1
22.261 1.210 (19.853, 24.670)
(9.741, 34.782)
Prediction Intervals
β€’ 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.
New Obs Fit
1
22.261
SE Fit
95% CI
1.210 (19.853, 24.670)
95% PI
(9.741, 34.782)
Prediction Intervals
Prediction Intervals
β€’ Model has best predictive properties – narrowest
interval – at the means of the predictors.
β€’ Predict MPG from HP at the mean of HP