0% found this document useful (0 votes)
576 views7 pages

Econ231W MWD Example

The document describes using a log-linear model and linear model to model the relationship between the log of chicken consumption (ln(Q)) and disposable income, price of chicken, and composite price index. It provides the output of regressing ln(Q) on the independent variables, showing a high R-squared value of 0.98. It then fits a linear regression model with the same independent variables, showing a lower R-squared value of 0.92. To select the better fitting model, it performs a Modified Wald test where the null hypothesis is that the linear model fits better and the alternative is that the log-linear model fits better. It calculates the test statistic by taking the difference between the logged predicted values from
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
576 views7 pages

Econ231W MWD Example

The document describes using a log-linear model and linear model to model the relationship between the log of chicken consumption (ln(Q)) and disposable income, price of chicken, and composite price index. It provides the output of regressing ln(Q) on the independent variables, showing a high R-squared value of 0.98. It then fits a linear regression model with the same independent variables, showing a lower R-squared value of 0.92. To select the better fitting model, it performs a Modified Wald test where the null hypothesis is that the linear model fits better and the alternative is that the log-linear model fits better. It calculates the test statistic by taking the difference between the logged predicted values from
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 7

Model Selection: MWD Test

Problem 11.17

a. Estimate a log-linear model using the given data. You can use any combination of the independent
variables you choose. I estimated a regression with ln(Q)=f(ln(disposable income), ln(price of
chicken), ln(composite price index)). [Note this is not the best model] Be sure to store the
residuals, this also stores the predicted Y, (Y-hat).

SUMMARY
OUTPUT

Regression Statistics
Multiple R 0.990
R Square 0.980
Adjusted R Square 0.977
Standard Error 0.028
Observations 23

ANOVA
  df SS MS F Significance F
Regression 3 0.759 0.253 315.206 0.000
Residual 19 0.015 0.001
Total 22 0.775      

Standard
  Coefficients Error t Stat P-value
Intercept 2.030 0.119 17.103 0.000
ln(disposable inc) 0.481 0.068 7.058 0.000
ln(Pchick) -0.351 0.079 -4.416 0.000
ln(Pcomp index) -0.061 0.130 -0.470 0.644
Here are the predicted values of (ln(Y)) and the residuals (e) from the log-linear regression.

RESIDUAL
OUTPUT

Observation Predicted ln(Q(Chick)) Residuals


1 3.343 -0.018
2 3.396 0.002
3 3.405 -0.011
4 3.432 -0.005
5 3.487 -0.046
6 3.509 -0.003
7 3.524 0.048
8 3.589 0.005
9 3.614 -0.011
10 3.630 0.018
11 3.670 0.029
12 3.706 -0.010
13 3.738 -0.005
14 3.645 0.054
15 3.711 -0.005
16 3.703 -0.011
17 3.774 -0.020
18 3.821 -0.034
19 3.819 0.025
20 3.874 0.050
21 3.942 -0.028
22 3.958 -0.013
23 3.980 -0.011
b. Now estimate a linear regression using the same collection of independent variables.
SUMMARY
OUTPUT

Regression Statistics
Multiple R 0.959
R Square 0.920
Adjusted R Square 0.907
Standard Error 2.246
Observations 23

ANOVA
  df SS MS F Significance F
Regression 3 1100.112 366.704 72.716 0.000
Residual 19 95.816 5.043
Total 22 1195.929      

Standard
  Coefficients Error t Stat P-value
Intercept 32.587 3.974 8.200 0.000
Disposable inc 0.010 0.004 2.283 0.034
Pchick -0.296 0.131 -2.257 0.036
Pcomp index 0.106 0.072 1.466 0.159
Here are the predicted values of Y and the residuals (e) from the linear regression.

RESIDUAL
OUTPUT

Observation Predicted Q(Chick) Residuals


1 30.835 -3.035
2 32.318 -2.418
3 32.010 -2.210
4 32.633 -1.833
5 33.509 -2.309
6 34.131 -0.831
7 34.364 1.236
8 35.520 0.880
9 35.838 0.862
10 36.524 1.876
11 38.360 2.040
12 38.344 1.956
13 40.190 1.610
14 38.052 2.348
15 40.058 0.642
16 40.915 -0.815
17 43.058 -0.358
18 43.669 0.431
19 42.754 3.946
20 47.491 3.109
21 52.710 -2.610
22 53.639 -1.939
23 55.476 -2.576
c. To choose between the two functional forms we use the MWD test

H0: Linear model: Y is a linear function of the X’s


H1: Log-linear model: ln(Y) is a linear function of the X’s or the ln(X)’s.

Take the natural log of Y-hat from the linear regression, that is take the natural log of the predicted Y in the
table above. [Note this is not the same as the predicted(lnY) from the first regression.] You would get the
following values:

ln(Y-hat)
3.429
3.476
3.466
3.485
3.512
3.530
3.537
3.570
3.579
3.598
3.647
3.647
3.694
3.639
3.690
3.711
3.763
3.777
3.755
3.861
3.965
3.982
4.016
We use these values to create the variable Z1 = ln(Y-hat) – predicted(lnY)

Z1 = ln(Y-hat) - predicted(lnY)
0.09
0.08
0.06
0.05
0.02
0.02
0.01
-0.02
-0.04
-0.03
-0.02
-0.06
-0.04
-0.01
-0.02
0.01
-0.01
-0.04
-0.06
-0.01
0.02
0.02
0.04

Regress Y on the X’s and Z1 to get the following results:

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.991
R Square 0.981
Adjusted R Square 0.977
Standard Error 1.120
Observations 23

ANOVA
  df SS MS F Significance F
Regression 4 1173.361 293.340 233.967 0.000
Residual 18 22.568 1.254
Total 22 1195.929      

Coefficient Standard
  s Error t Stat P-value
Intercept 30.766 1.996 15.416 0.000
Disposable inc 0.008 0.002 3.994 0.001
Pchick -0.187 0.067 -2.796 0.012
Pcomp index 0.087 0.036 2.404 0.027
Z1 = ln(Y-hat) - predicted(lnY) -45.125 5.904 -7.643 0.000

Reject H0 if Z1 is statistically significant, in this case we see that Z1 is statistically significant, conclude that
H1 a log-linear model is a better fit.

Now calculate Z2 = antilog(ln(Y-hat) – Y(hat)) and regress lnY on the natural logs of X’s and the new
variable Z2.

SUMMARY OUTPUT

Regression Statistics
Multiple R 0.991
R Square 0.982
Adjusted R Square 0.978
Standard Error 0.028
Observations 23

ANOVA
  df SS MS F Significance F
Regression 4 0.761 0.190 242.066 0.000
Residual 18 0.014 0.001
Total 22 0.775      

  Coefficients Standard Error t Stat P-value


Intercept 2.015 0.118 17.067 0.000
ln(disposable inc) 0.454 0.071 6.393 0.000
ln(Pchick) -0.292 0.093 -3.157 0.005
ln(Pcomp index) -0.066 0.129 -0.515 0.613
Z2 = antilog(ln(Y-hat) - Y- -
hat 38073961326.163 31880130123.800 -1.194 0.248

Here we find that the variable Z2 is not statistically significant and conclude that the log-linear model is the
appropriate model.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy