Download presentation

Presentation is loading. Please wait.

Published byKarson Huband Modified over 2 years ago

1
Economics 310 Lecture 2 General Linear Model Continued.

2
Estimation of Linear Model To find an estimator of the unknown coefficients in the vector , we follow the least squares procedure. A given estimate of gives an estimate of the mean function E[y t ]= 1 +x t2 2 +x t3 3. We want to choose an estimate such that the sum of squared differences between each observation y t and the estimate of the mean function E[y t ] is a minimum.

3
LS Objective function

4
First Order Conditions

5
First Order Conditions Cont.

6
First Order Conditions in matrix form

7
Least-squares solution

8
General Solution

9
OLS – Shazam vs Matrix Alegbra sample 1 20 read x1 x2 x3 * generate a set of y for y=10+3x1-4x2+5x3+e genr y=10+3*x1-4*x2+5*x3+nor(2) ols y x1 x2 x3 * generate results using matrix algebra genr x0=1 copy x0 x1 x2 x3 x matrix b=inv(x'x)*x'*y print b stop

10
Results of Matrix Example VARIANCE OF THE ESTIMATE-SIGMA**2 = 135.55 STANDARD ERROR OF THE ESTIMATE-SIGMA = 11.643 VARIABLE ESTIMATED STANDARD T-RATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 16 DF P-VALUE CORR. COEFFICIENT AT MEANS X1 2.9701 0.1076 27.61 0.000 0.990 0.3840 0.7246 X2 -4.0604 0.1318 -30.82 0.000-0.992 -0.3787 -1.0227 X3 5.0685 0.1244 40.75 0.000 0.995 0.5907 1.2387 CONSTANT 11.487 9.309 1.234 0.235 0.295 0.0000 0.0594 |_* generate results using matrix algebra |_genr x0=1 |_copy x0 x1 x2 x3 x |_matrix b=inv(x'x)*x'*y |_print b B 11.48749 2.970102 -4.060408 5.068454

11
Percapita Income Example sample 1 20 format (A11,F7.0,F8.0,2F6.0) read COUNTRY PCINC AGR IND SER /format CANADA 1536 13 43 45 SWEEDEN 1644145333 SWITZERLAND 1361115633 LUXEMBOURG 1242155134 U. KINGDOM 1105 4 5640 DENMARK 1049184537 W. GERMANY 1035156025 FRANCE 1013204436 BELGUIM 1005 6 5242 NORWAY 977204932 ICELAND 839254729 NETHERLANDS 810114940 AUSTRIA 681234730 IRELAND 529363034 ITALY 504274628 JAPAN 344333532 GREECE 324562420 SPAIN 290 423721 PORTUGAL 238443323 TURKEY 1777912 9 ols pcinc agr ind end

12
Shazam OLS Results |_sample 1 20 |_format(A13,F5.0,3F3.0) |_read COUNTRY PCINC AGR IND SER / format READ USES FORMAT:(A13,F5.0,3F3.0) |_ols pcinc agr ind REQUIRED MEMORY IS PAR= 2 CURRENT PAR= 2000 OLS ESTIMATION 20 OBSERVATIONS DEPENDENT VARIABLE= PCINC...NOTE..SAMPLE RANGE SET TO: 1, 20 R-SQUARE = 0.6231 R-SQUARE ADJUSTED = 0.5788 VARIANCE OF THE ESTIMATE-SIGMA**2 = 67294. STANDARD ERROR OF THE ESTIMATE-SIGMA = 259.41 SUM OF SQUARED ERRORS-SSE= 0.11440E+07 MEAN OF DEPENDENT VARIABLE = 767.10 LOG OF THE LIKELIHOOD FUNCTION = -137.922 VARIABLE ESTIMATED STANDARD T-RATIO PARTIAL STANDARDIZED ELASTICITY NAME COEFFICIENT ERROR 17 DF P-VALUE CORR. COEFFICIENT AT MEANS AGR -14.205 8.219 -1.728 0.102-0.387 -0.6912 -0.5352 IND 3.5139 13.42 0.2618 0.797 0.063 0.1047 0.1926 CONSTANT 1029.9 792.0 1.300 0.211 0.301 0.0000 1.3425 |_end

13
Estimating the error variance

14
Heuristic Explanation of unbiasness Truth Estimate Y X

15
Sampling Properties

16
Variance – Covariance Matrix

Similar presentations

© 2017 SlidePlayer.com Inc.

All rights reserved.

Ads by Google