help: r2nlsur dialog:

Title

r2nlsur: (NL-SUR) Overall System R2 - Adjusted R2 - F Test - Chi2 Test

Table of Contents

Syntax

Description

Saved Results

References

*** Examples

Author

Syntax

r2nlsur

Description

r2nlsur computes Overall Nonlinear Seemingly Unrelated Regression (NL-SUR) System R2, Adj. R2, F-Test, and Chi2-Test after:

- nlsur: (NL-SUR) Nonlinear Seemingly Unrelated Regression for sets of equations.

r2nlsur used 5 types of criteria and tests, as discussed in:

McElroy(1977), Judge et al(1985), Dhrymes(1974), Greene(1993), and Berndt(1991).

see eq.12.1.33-36 in Judge et al(1985, p.477).

1- Berndt System R2 = 1-|E'E| / |Yb'Yb|
2- McElroy System R2 = 1-(U'W*U)/ (Y'W*Y)
3- Judge System R2 = 1-(U'U) / (Y'Y)
Q
4- Dhrymes System R2 = Sum [R2i (yi' Dt yi']/[Y(I(Q) # Dt)Y]
i=1
5- Greene System R2 = 1-(Q/trace(inv(Sig))*SYs)

From each type of these system R2's, r2nlsur can calculate Adjusted R2, F-Test, and Chi2-Test:

Adjusted R2 = 1-(1-R2)*((QN-Q)/(QN-K))
F-Test = R2/(1-R2)*[(QN-K)/(K-Q)]
Chi2-Test = -N*(log(1-R2))

where
|E'E| = determinant of residual matrix (NxQ)
|Yb'Yb| = determinant of dependent variables matrix in deviation from mean (NxQ)
yi = dependent variable of eq. i (Nx1)
Y = stacked vector of dependent variables (QNx1)
U = stacked vector of residuals (QNx1)
W = variance-covariance matrix of residuals (W=inv(Omega) # I(N))
N = number of observations
K = Number of Parameters
Q = Number of Equations
R2i = R2 of eq. i
Dt = I(N)-JJ'/N, with J=(1,1,...,1)' (Nx1)
SYs = (Yb1*Yb2*...Ybq)/N
Sig = Sigma hat Matrix
Degrees of Freedom F-Test = (K-Q), (QN)
Degrees of Freedom Chi2-Test = (K-Q)
Log Determinant of Sigma = log|Sigma matrix|
Log Likelihood Function LLF =-(N*Q/2)*(1+log(2*_pi))-(N/2*abs(log(Sigma)))

Saved Results

r2nlsur saves the following in r():

Scalars

r(N) Number of Observations
r(k) Number of Parameters
r(k_eq) Number of Equations
r(chi_df) DF chi-squared
r(f_df1) F-Test DF1 Numerator
r(f_df2) F-Test DF2 Denominator
r(r2_b) Berndt R-squared
r(r2_j) Judge R-squared
r(r2_m) McElroy R-squared
r(r2_d) Dhrymes R-squared
r(r2_g) Greene R-squared
r(r2a_b) Berndt Adjusted R-squared
r(r2a_j) Judge Adjusted R-squared
r(r2a_m) McElroy Adjusted R-squared
r(r2a_d) Dhrymes Adjusted R-squared
r(r2a_g) Greene Adjusted R-squared
r(f_b) Berndt F Test
r(f_j) Judge F Test
r(f_m) McElroy F Test
r(f_d) Dhrymes F Test
r(f_g) Greene F Test
r(chi_b) Berndt Chi2 Test
r(chi_j) Judge Chi2 Test
r(chi_m) McElroy Chi2 Test
r(chi_d) Dhrymes Chi2 Test
r(chi_g) Greene Chi2 Test
r(lsig2) Log Determinant of Sigma
r(llf) Log Likelihood Function LLF

References

Berndt, Ernst R. (1991)
"The practice of econometrics: Classical and contemporary",
Addison-Wesley Publishing Company; 468.

Dhrymes, Phoebus J. (1974)
"Econometrics: Statistical Foundations and Applications",
2ed edition Springer- Verlag New York, USA..

Greene, William (1993)
"Econometric Analysis",
2nd ed., Macmillan Publishing Company Inc., New York, USA.; 490-491.

Judge, Georege, W. E. Griffiths, R. Carter Hill, Helmut Lutkepohl, & Tsoung-Chao Lee(1985)
"The Theory and Practice of Econometrics",
2nd ed., John Wiley & Sons, Inc., New York, USA; 477-478.

Kmenta, Jan (1986)
"Elements of Econometrics",
2nd ed., Macmillan Publishing Company, Inc., New York, USA; 645.

McElroy, Marjorie B. (1977)
"Goodness of Fit for Seemingly Unrelated Regressions: Glahn's R2y,x and Hooper's r~2",
Journal of Econometrics, 6(3), November; 381-387.

Examples

clear all

sysuse r2nlsur.dta , clear

* (1) NL-SUR Model:

nlsur (y1={B10}+{B11}*y2+{B12}*x1+{B13}*x2) (y2={B20}+{B21}*y1+{B22}*x3+{B23}*x4)

r2nlsur

* (2) SUR Model:

sureg (y1 y2 x1 x2) (y2 y1 x3 x4)

r2reg3

return list

* If you want to use dialog box: Press OK to compute r2nlsur

db r2nlsur

. clear all
. sysuse r2nlsur.dta , clear
. nlsur (y1={B10}+{B11}*y2+{B12}*x1+{B13}*x2) (y2={B20}+{B21}*y1+{B22}*x3+{B23}*x4)

Calculating NLS estimates...
Iteration 0: Residual SS = 3275.692
Iteration 1: Residual SS = 3275.692
Calculating FGNLS estimates...
Iteration 0: Scaled RSS = 33.99796
Iteration 1: Scaled RSS = 33.99796

FGNLS regression
---------------------------------------------------------------------
Equation | Obs Parms RMSE R-sq Constant
----------------+----------------------------------------------------
1 y1 | 17 4 8.827101 0.8628 B10
2 y2 | 17 4 10.71362 0.8332 B20
---------------------------------------------------------------------

------------------------------------------------------------------------------
| Coef. Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
/B10 | 159.7348 48.37047 3.30 0.001 64.93046 254.5392
/B11 | .1440474 .1473363 0.98 0.328 -.1447264 .4328211
/B12 | .3736436 .4464905 0.84 0.403 -.5014617 1.248749
/B13 | -1.17085 .2398822 -4.88 0.000 -1.64101 -.7006895
/B20 | 40.22012 31.80722 1.26 0.206 -22.12087 102.5611
/B21 | -.0911744 .2613464 -0.35 0.727 -.6034038 .4210551
/B22 | -.3973436 .2758714 -1.44 0.150 -.9380417 .1433545
/B23 | 2.480269 1.01631 2.44 0.015 .4883381 4.472201
------------------------------------------------------------------------------

. r2nlsur

==============================================================================
* Nonlinear Seemingly Unrelated Regression: Method = (fgnls)
* (NL-SUR) Overall System R2 - Adjusted R2 - F Test - Chi2 Test
==============================================================================

+----------------------------------------------------------------------------------+
| Name | R2 | Adj_R2 | F | P-Value | Chi2 | P-Value |
|----------+-----------+-----------+-----------+-----------+-----------+-----------|
| Berndt | 0.9326 | 0.9171 | 59.9838 | 0.0000 | 45.8573 | 0.0000 |
| McElroy | 0.8506 | 0.8161 | 24.6660 | 0.0000 | 32.3159 | 0.0000 |
| Judge | 0.8466 | 0.8111 | 23.9065 | 0.0000 | 31.8647 | 0.0000 |
| Dhrymes | 0.8466 | 0.8111 | 23.9065 | 0.0000 | 31.8647 | 0.0000 |
| Greene | 0.8173 | 0.7751 | 19.3807 | 0.0000 | 28.8954 | 0.0001 |
+----------------------------------------------------------------------------------+
Number of Parameters = 8
Number of Equations = 2
Degrees of Freedom F-Test = (6, 34)
Degrees of Freedom Chi2-Test = 6
Log Determinant of Sigma = 9.0985
Log Likelihood Function = -125.5810
------------------------------------------------------------------------------

Author

- Emad Abd Elmessih Shehata
Professor (PhD Economics)
Agricultural Research Center - Agricultural Economics Research Institute - Egypt
Email: emadstat@hotmail.com
WebPage at IDEAS: http://ideas.repec.org/f/psh494.html
WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm

R2NLSUR Citation

Shehata, Emad Abd Elmessih & Sahra Khaleel A. Mickaiel (2014)

R2NLSUR: "Stata Module to Compute (NL-SUR) Overall System R2, F-Test, and Chi2-Test"

http://ideas.repec.org/c/boc/bocode/s457493.html

http://econpapers.repec.org/software/bocbocode/s457493.htm

Online Help:

* Model Selection Diagnostic Criteria:
diagmle MLE Model Selection Diagnostic Criteria
diagnl NLS Model Selection Diagnostic Criteria
diagnlsur (NL-SUR) Overall System Model Selection Diagnostic Criteria
diagreg OLS Model Selection Diagnostic Criteria
diagreg2 2SLS-IV Model Selection Diagnostic Criteria
diagreg3 (3SLS-SUR) Overall System Model Selection Diagnostic Criteria
diagsem (SEM-FIML) Overall System Model Selection Diagnostic Criteria
diagvar (VAR) Overall System Model Selection Diagnostic Criteria
diagxt Panel Data Model Selection Diagnostic Criteria
---------------------------------------------------------------------------
* Linear vs Log-Linear Functional Form Tests:
lmfmle MLE Linear vs Log-Linear Functional Form Tests
lmfreg OLS Linear vs Log-Linear Functional Form Tests
lmfreg2 2SLS-IV Linear vs Log-Linear Functional Form Tests
---------------------------------------------------------------------------
lmhaus2 2SLS-IV Hausman Specification Test
lmhausxt Panel Data Hausman Specification Test
---------------------------------------------------------------------------
lmiden2 2SLS-IV Over Identification Restrictions Tests
---------------------------------------------------------------------------
lmeg Augmented Engle-Granger Cointegration Test
lmgc 2SLS-IV Granger Causality Test
lmsrd OLS Spurious Regression Diagnostic
---------------------------------------------------------------------------
* REgression Specification Error Tests (RESET):
reset OLS REgression Specification Error Tests (RESET)
reset2 2SLS-IV REgression Specification Error Tests (RESET)
resetmle MLE REgression Specification Error Tests (RESET)
resetxt Panel Data REgression Specification Error Tests (RESET)
---------------------------------------------------------------------------