0% found this document useful (0 votes)
48 views4 pages

Seemingly Unrelated Regressions Stata Program and Output

This document discusses using seemingly unrelated regression (SUR) in Stata. It loads data, defines variables, runs OLS regressions on subsets of variables, estimates a SUR model with correlated errors, tests cross-equation constraints, and estimates the SUR model with a constraint that coefficients be equal across equations.

Uploaded by

Hufzi Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views4 pages

Seemingly Unrelated Regressions Stata Program and Output

This document discusses using seemingly unrelated regression (SUR) in Stata. It loads data, defines variables, runs OLS regressions on subsets of variables, estimates a SUR model with correlated errors, tests cross-equation constraints, and estimates the SUR model with a constraint that coefficients be equal across equations.

Uploaded by

Hufzi Khan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

* Seemingly Unrelated Regressions (SUR) in Stata

* Copyright 2013 by Ani Katchova

clear all
set more off

use C:\Econometrics\Data\sur_scores

global y1list math


global y2list read
global x1list female prog science
global x2list female socst
global x1 female

describe $y1list $y2list $x1list $x2list


summarize $y1list $y2list $x1list $x2list

* OLS regressions
reg $y1list $x1list
reg $y2list $x2list

* SUR model
sureg ($y1list $x1list) ($y2list $x2list), corr

* Testing of cross-equation constraints


test [$y1list]$x1 = [$y2list]$x1

* SUR model with cross-equation constraint


constraint 1 [$y1list]$x1 = [$y2list]$x1
sureg ($y1list $x1list)($y2list $x2list), constraints(1)
. * Seemingly Unrelated Regressions (SUR) in Stata
. * Copyright 2013 by Ani Katchova
.
. clear all

. set more off

.
. use C:\Econometrics\Data\sur_scores
(highschool and beyond (200 cases))

.
. global y1list math

. global y2list read

. global x1list female prog science

. global x2list female socst

. global x1 female

.
. describe $y1list $y2list $x1list $x2list

storage display value


variable name type format label variable label
--------------------------------------------------------------------------------------
-------------------
math float %9.0g math score
read float %9.0g reading score
female float %9.0g
prog float %9.0g type of program
science float %9.0g science score
female float %9.0g
socst float %9.0g social studies score

. summarize $y1list $y2list $x1list $x2list

Variable | Obs Mean Std. Dev. Min Max


-------------+--------------------------------------------------------
math | 200 52.645 9.368448 33 75
read | 200 52.23 10.25294 28 76
female | 200 .545 .4992205 0 1
prog | 200 2.025 .6904772 1 3
science | 200 51.85 9.900891 26 74
-------------+--------------------------------------------------------
female | 200 .545 .4992205 0 1
socst | 200 52.405 10.73579 26 71

.
. * OLS regressions
. reg $y1list $x1list

Source | SS df MS Number of obs = 200


-------------+------------------------------ F( 3, 196) = 43.81
Model | 7010.50752 3 2336.83584 Prob > F = 0.0000
Residual | 10455.2875 196 53.3433035 R-squared = 0.4014
-------------+------------------------------ Adj R-squared = 0.3922
Total | 17465.795 199 87.7678141 Root MSE = 7.3037

------------------------------------------------------------------------------
math | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
female | .9656828 1.045894 0.92 0.357 -1.096968 3.028333
prog | -.4128426 .7638838 -0.54 0.589 -1.919329 1.093644
science | .5975687 .053712 11.13 0.000 .491641 .7034964
_cons | 21.97077 3.582234 6.13 0.000 14.9061 29.03544
------------------------------------------------------------------------------

. reg $y2list $x2list

Source | SS df MS Number of obs = 200


-------------+------------------------------ F( 2, 197) = 63.93
Model | 8233.79028 2 4116.89514 Prob > F = 0.0000
Residual | 12685.6297 197 64.3940595 R-squared = 0.3936
-------------+------------------------------ Adj R-squared = 0.3874
Total | 20919.42 199 105.122714 Root MSE = 8.0246

------------------------------------------------------------------------------
read | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
female | -1.763517 1.141039 -1.55 0.124 -4.013735 .4867015
socst | .5978268 .0530589 11.27 0.000 .4931903 .7024632
_cons | 21.86201 2.873858 7.61 0.000 16.19453 27.52948
------------------------------------------------------------------------------

.
. * SUR model
. sureg ($y1list $x1list) ($y2list $x2list), corr

Seemingly unrelated regression


----------------------------------------------------------------------
Equation Obs Parms RMSE "R-sq" chi2 P
----------------------------------------------------------------------
math 200 3 7.256297 0.3971 111.11 0.0000
read 200 2 7.981054 0.3910 112.68 0.0000
----------------------------------------------------------------------

------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
math |
female | .8047752 1.035145 0.78 0.437 -1.224072 2.833622
prog | -.5303 .7433182 -0.71 0.476 -1.987177 .9265769
science | .5338002 .0524355 10.18 0.000 .4310285 .6365718
_cons | 25.60272 3.493717 7.33 0.000 18.75516 32.45028
-------------+----------------------------------------------------------------
read |
female | -1.708889 1.132408 -1.51 0.131 -3.928367 .5105893
socst | .5493215 .0519639 10.57 0.000 .4474741 .6511688
_cons | 24.37415 2.817793 8.65 0.000 18.85138 29.89693
------------------------------------------------------------------------------

Correlation matrix of residuals:

math read
math 1.0000
read 0.1849 1.0000

Breusch-Pagan test of independence: chi2(1) = 6.835, Pr = 0.0089

.
. * Testing of cross-equation constraints
. test [$y1list]$x1 = [$y2list]$x1

( 1) [math]female - [read]female = 0

chi2( 1) = 3.28
Prob > chi2 = 0.0701

.
. * SUR model with cross-equation constraint
. constraint 1 [$y1list]$x1 = [$y2list]$x1

. sureg ($y1list $x1list)($y2list $x2list), constraints(1)

Seemingly unrelated regression


----------------------------------------------------------------------
Equation Obs Parms RMSE "R-sq" chi2 P
----------------------------------------------------------------------
math 200 3 7.284186 0.3924 109.08 0.0000
read 200 2 8.013775 0.3860 109.60 0.0000
----------------------------------------------------------------------

( 1) [math]female - [read]female = 0
------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
math |
female | -.3152625 .8328986 -0.38 0.705 -1.947714 1.317189
prog | -.5481211 .7468853 -0.73 0.463 -2.011989 .9157471
science | .525379 .0524311 10.02 0.000 .4226158 .6281422
_cons | 26.68586 3.453638 7.73 0.000 19.91686 33.45487
-------------+----------------------------------------------------------------
read |
female | -.3152625 .8328986 -0.38 0.705 -1.947714 1.317189
socst | .5454426 .0521048 10.47 0.000 .4433191 .6475661
_cons | 23.8179 2.814497 8.46 0.000 18.30159 29.33421
------------------------------------------------------------------------------

You might also like