|
Examples / SUR.RPF |
SUR.RPF is an example of (linear) systems estimation. It computes joint GLS estimates for a two company subset for Grunfeld’s investment equations.
The Grunfeld data is a common “textbook” data set for small panels. The full data set has annual data from 1935 to 1954 on 11 companies with investment (the dependent variable), capital stock and the firm’s market value (explanatory variables). The two countries included in the example are GE and Westinghouse.
Because the instruction SUR operates off EQUATIONs, the following are used to define them:
equation geeq ige
# constant fge cge
equation westeq iwest
# constant fwest cwest
Since this is also doing OLS estimates, it’s also possible to estimate by LINREG and define the define the equation at the same time:
linreg(define=geeq) ige
# constant fge cge
If the EQUATIONs have already been defined, the LINREGs can be done with:
linreg(equation=geeq) ige
linreg(equation=westeq) iwest
There are two ways to get the description of the overall model into the SUR instruction: with supplementary cards or with a MODEL. With just two equations, the former is probably easier, but we’ll show both. The unrestricted SUR can be done with
sur(vcv) 2
# geeq
# westeq
or with
group grunfeld geeq westeq
sur(model=grunfeld)
This uses RESTRICT to test for equality between the “F” (market value) coefficients. In the stacked coefficient vector, the FGE coefficient is position 2 and the FWEST is position 5:
restrict(title="Test of equality of F coefficients") 1
# 2 5
# 1 -1 0
and this estimates the system subject to equality constraints across all the equations by using the EQUATE option:
sur(model=grunfeld,equate=||2,3||)
which forces the second (Fxx) and third (Cxx) coefficients to be equal across equations. Note that this rearranges the coefficient vector, so the coefficients which are forced equal are listed first. In this case, there are actually only four free coefficients: Fxx, Cxx, CONSTANT in GE and CONSTANT in WEST. The output will display the information in the usual equation by equation form, but you will note that the coefficient numbers are out-of-sequence.
Full Program
cal 1935
open data grunfeld.wks
data(org=obs,format=wks) 1935:1 1954:1 ige fge cge iwest fwest cwest
*
* Define equations
*
equation geeq ige
# constant fge cge
equation westeq iwest
# constant fwest cwest
*
* Estimate by OLS
*
linreg(equation=geeq) ige
linreg(equation=westeq) iwest
*
* Now by SUR
*
sur(vcv) 2
# geeq
# westeq
*
* Same thing defining a MODEL
*
group grunfeld geeq westeq
sur(model=grunfeld)
*
* Test that the "F" coefficients are identical
*
restrict(title="Test of equality of F coefficients") 1
# 2 5
# 1 -1 0
*
* Forcing the 2nd and 3rd coefficients to be equal across equations.
*
sur(model=grunfeld,equate=||2,3||)
Output
Linear Regression - Estimation by Least Squares
Dependent Variable IGE
Annual Data From 1935:01 To 1954:01
Usable Observations 20
Degrees of Freedom 17
Centered R^2 0.7053067
R-Bar^2 0.6706369
Uncentered R^2 0.9479894
Mean of Dependent Variable 102.29000000
Std Error of Dependent Variable 48.58449937
Standard Error of Estimate 27.88272475
Sum of Squared Residuals 13216.587770
Regression F(2,17) 20.3435
Significance Level of F 0.0000309
Log Likelihood -93.3137
Durbin-Watson Statistic 1.0721
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -9.95630645 31.37424914 -0.31734 0.75484994
2. FGE 0.02655119 0.01556610 1.70571 0.10626510
3. CGE 0.15169387 0.02570408 5.90155 0.00001742
Linear Regression - Estimation by Least Squares
Dependent Variable IWEST
Annual Data From 1935:01 To 1954:01
Usable Observations 20
Degrees of Freedom 17
Centered R^2 0.7444461
R-Bar^2 0.7143810
Uncentered R^2 0.9594526
Mean of Dependent Variable 42.891500000
Std Error of Dependent Variable 19.110188596
Standard Error of Estimate 10.213122845
Sum of Squared Residuals 1773.2339304
Regression F(2,17) 24.7611
Significance Level of F 0.0000092
Log Likelihood -73.2271
Durbin-Watson Statistic 1.4130
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -0.509390184 8.015288941 -0.06355 0.95006800
2. FWEST 0.052894126 0.015706501 3.36766 0.00365476
3. CWEST 0.092406492 0.056098974 1.64720 0.11787433
Linear Systems - Estimation by Seemingly Unrelated Regressions
Iterations Taken 2
Annual Data From 1935:01 To 1954:01
Usable Observations 20
Log Likelihood -158.3196
Dependent Variable IGE
Mean of Dependent Variable 102.29000000
Std Error of Dependent Variable 48.58449937
Standard Error of Estimate 26.25678563
Sum of Squared Residuals 13788.375833
Durbin-Watson Statistic 0.9856
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -27.71931712 27.03282800 -1.02539 0.30517701
2. FGE 0.03831021 0.01329011 2.88261 0.00394396
3. CGE 0.13903627 0.02303559 6.03572 0.00000000
Dependent Variable IWEST
Mean of Dependent Variable 42.891500000
Std Error of Dependent Variable 19.110188596
Standard Error of Estimate 9.490260477
Sum of Squared Residuals 1801.3008785
Durbin-Watson Statistic 1.3647
Variable Coeff Std Error T-Stat Signif
************************************************************************************
4. Constant -1.251988228 6.956346688 -0.17998 0.85716997
5. FWEST 0.057629796 0.013411012 4.29720 0.00001730
6. CWEST 0.063978067 0.048900998 1.30832 0.19076540
Covariance\Correlation Matrix of Coefficients
Constant FGE CGE Constant FWEST CWEST
Constant 730.7737897 -0.91648771 -0.23484453 0.67515453 -0.62391596 0.29692502
FGE -0.3292660 0.0001766 -0.11121555 -0.56990847 0.67323119 -0.49976868
CGE -0.1462417 -0.0000340 0.0005306 -0.24725669 -0.05461557 0.52805012
Constant 126.9626218 -0.0526884 -0.0396213 48.3907592 -0.85776714 0.33400076
FWEST -0.2261930 0.0001200 -0.0000169 -0.0800225 0.0001799 -0.72367292
CWEST 0.3925148 -0.0003248 0.0005948 0.1136178 -0.0004746 0.0023913
Covariance\Correlation Matrix of Residuals
IGE IWEST
IGE 689.41879166 0.76504294
IWEST 190.63625609 90.06504392
Linear Systems - Estimation by Seemingly Unrelated Regressions
Iterations Taken 2
Annual Data From 1935:01 To 1954:01
Usable Observations 20
Log Likelihood -158.3196
Dependent Variable IGE
Mean of Dependent Variable 102.29000000
Std Error of Dependent Variable 48.58449937
Standard Error of Estimate 26.25678563
Sum of Squared Residuals 13788.375833
Durbin-Watson Statistic 0.9856
Variable Coeff Std Error T-Stat Signif
************************************************************************************
1. Constant -27.71931712 27.03282800 -1.02539 0.30517701
2. FGE 0.03831021 0.01329011 2.88261 0.00394396
3. CGE 0.13903627 0.02303559 6.03572 0.00000000
Dependent Variable IWEST
Mean of Dependent Variable 42.891500000
Std Error of Dependent Variable 19.110188596
Standard Error of Estimate 9.490260477
Sum of Squared Residuals 1801.3008785
Durbin-Watson Statistic 1.3647
Variable Coeff Std Error T-Stat Signif
************************************************************************************
4. Constant -1.251988228 6.956346688 -0.17998 0.85716997
5. FWEST 0.057629796 0.013411012 4.29720 0.00001730
6. CWEST 0.063978067 0.048900998 1.30832 0.19076540
Covariance\Correlation Matrix of Residuals
IGE IWEST
IGE 689.41879166 0.76504294
IWEST 190.63625609 90.06504392
Test of equality of F coefficients
Chi-Squared(1)= 3.203911 with Significance Level 0.07346239
Linear Systems - Estimation by Seemingly Unrelated Regressions
Iterations Taken 2
Annual Data From 1935:01 To 1954:01
Usable Observations 20
Log Likelihood -160.6472
Dependent Variable IGE
Mean of Dependent Variable 102.29000000
Std Error of Dependent Variable 48.58449937
Standard Error of Estimate 26.03373641
Sum of Squared Residuals 13555.108631
Durbin-Watson Statistic 1.0062
Variable Coeff Std Error T-Stat Signif
************************************************************************************
3. Constant -22.47292135 18.95280698 -1.18573 0.23572874
1. FGE 0.03521313 0.00808344 4.35621 0.00001323
2. CGE 0.14095059 0.02296517 6.13758 0.00000000
Dependent Variable IWEST
Mean of Dependent Variable 42.891500000
Std Error of Dependent Variable 19.110188596
Standard Error of Estimate 9.761225716
Sum of Squared Residuals 1905.6305498
Durbin-Watson Statistic 1.4008
Variable Coeff Std Error T-Stat Signif
************************************************************************************
4. Constant 7.1956492033 6.1594381566 1.16823 0.24271343
1. FWEST 0.0352131317 0.0080834405 4.35621 0.00001323
2. CWEST 0.1409505908 0.0229651663 6.13758 0.00000000
Covariance\Correlation Matrix of Residuals
IGE IWEST
IGE 677.75543154 0.70480098
IWEST 179.10485379 95.28152749
Copyright © 2025 Thomas A. Doan