-------------------------------------------------------------------------------
help: lmanlsur                                                   dialog: lmanls
> ur
-------------------------------------------------------------------------------

+-------+ ----+ Title +------------------------------------------------------------

lmanlsur: Overall System NL-SUR Autocorrelation Tests

+--------+ ----+ Syntax +-----------------------------------------------------------

lmanlsur

+-------------+ ----+ Description +------------------------------------------------------

lmanlsur computes overall NL-SUR system autocorrelation, after: - (NL-SUR) Non Linear Seemingly Unrelated Regression Estimation nlsur for sets of equations.

lmanlsur calculates Harvey and Guilkey autocorrelation LM tests: - Harvey LM test, see Judge et al(1985, p.494) eq.12.3.45. - Guilkey LM test, see Judge et al(1985, p.494) eq.12.3.46. - Durbin-Watson DW test.

1- Harvey Single Equation LM test = N(Rho_i) ~ Chi2(1) Ho: No Autocorrelation in eq. # : Pij=0

Q 2- Harvey Overall System LM test = N [ Sum(Rho_i) ] ~ Chi2(Q) i=1

3- Guilkey Overall System LM test = R'[ inv(Sig) # E1'E1 ] R ~ Chi2(Q^2) Ho: No Autocorrelation in the Overall System: P11 = P22 = PMM = 0

where N = Number of Observations. Q = Number of Equations. Rho_i = Autoregressive Coefficient of eq. i E1 = Lagged Residuals Matrix [(N-1)xQ]. R = Vector of Rho Coefficients. Sig = Sigma hat Matrix.

+---------------+ ----+ Saved Results +----------------------------------------------------

lmanlsur saves the following in r():

Scalars

r(rho_#) Rho Value for eq.# r(lmh_#) Durbin-Watson Single Equation Test for eq.# r(lmh_#) Harvey Single Equation LM Test for eq.# r(lmhp_#) Harvey Single Equation LM Test P-Value for eq.# r(lmh) Harvey Overall System Autocorrelation LM test r(lmhp) Harvey Overall System Autocorrelation LM test P-Value r(lmg) Guilkey Overall System Autocorrelation LM test r(lmgp) Guilkey Overall System Autocorrelation LM test P-Value

+------------+ ----+ References +-------------------------------------------------------

Guilkey, David K. (1974) "Alternative Tests for a First-Order Vector Autoregressive Error Specification", Journal of Econometrics, vol.2(1); 95-104.

Guilkey, David K. (1975) "A Test for the Presence of First-Order Vector Autoregressive Errors When Lagged Endogenous Variables Are Present", Econometrica, vol.43, July; 711-117.

Guilkey, David K. Peter Schmidt (1973) "Estimation of Seemingly Unrelated Regression Equations with First-Order Autoregressive Errors", {it:Journal of the American Statistical Association, vol. 68, September; 642-647.

Harvey, Andrew C. (1982) "A Test of Misspecification for Systems of Equations", Discussion Paper No. A31, London School of. Economics Econometrics Programme, London, England.

Harvey, Andrew C. (1990) "The Econometric Analysis of Time Series", 2nd Edition, MIT Press Books, The MIT Press, edition 2, volume 1, number 026208189x.

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; 494.

+----------+ ----+ Examples +---------------------------------------------------------

clear all

sysuse lmanlsur.dta , clear

* (1) NL-SUR Model:

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

lmanlsur

return list

* (2) SUR Model:

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

lmanlsur

return list

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

FGNLS regression --------------------------------------------------------------------- Equation | Obs Parms RMSE R-sq Constant ----------------+---------------------------------------------------- 1 y1 | 20 4 125.6433 0.8266 B10 2 y2 | 20 4 19.52663 0.7801 B20 ---------------------------------------------------------------------

------------------------------------------------------------------------------ | Coef. Std. Err. z P>|z| [95% Conf. Interval] -------------+---------------------------------------------------------------- /B10 | -68.61381 119.3219 -0.58 0.565 -302.4804 165.2528 /B11 | 6.586666 .6994811 9.42 0.000 5.215708 7.957623 /B12 | .0771727 .0496441 1.55 0.120 -.020128 .1744733 /B13 | -.3247027 .2355698 -1.38 0.168 -.7864111 .1370056 /B20 | 11.0109 24.11753 0.46 0.648 -36.25859 58.28038 /B21 | .137451 .0141117 9.74 0.000 .1097926 .1651094 /B22 | -.0018792 .0116164 -0.16 0.871 -.0246469 .0208885 /B23 | -.0024405 .0142685 -0.17 0.864 -.0304061 .0255252 ------------------------------------------------------------------------------

. lmanlsur ============================================================================== * NL-SUR System Autocorrelation Tests ============================================================================== *** Single Equation Autocorrelation Tests: Ho: No Autocorrelation in eq. #: Pij=0

Eq. 1 : Harvey LM Test = 3.6355 Rho = 0.1818 P-Value > Chi2(1) 0.0566 Eq. 2 : Harvey LM Test = 3.2207 Rho = 0.1610 P-Value > Chi2(1) 0.0727 ------------------------------------------------------------------------------ Eq. 1 : Durbin-Watson DW Test = 1.1244 Eq. 2 : Durbin-Watson DW Test = 1.1598 ------------------------------------------------------------------------------

*** Overall System NL-SUR Autocorrelation Tests: Ho: No Overall System Autocorrelation: P11 = P22 = PMM = 0

- Harvey LM Test = 6.8562 P-Value > Chi2(2) 0.0324 - Guilkey LM Test = 4.3428 P-Value > Chi2(4) 0.3616 ------------------------------------------------------------------------------

+--------+ ----+ Author +-----------------------------------------------------------

Emad Abd Elmessih Shehata Assistant Professor Agricultural Research Center - Agricultural Economics Research Institute - Eg > ypt Email: emadstat@hotmail.com WebPage: http://emadstat.110mb.com/stata.htm WebPage at IDEAS: http://ideas.repec.org/f/psh494.html WebPage at EconPapers: http://econpapers.repec.org/RAS/psh494.htm

+-------------------+ ----+ lmanlsur Citation +------------------------------------------------

Shehata, Emad Abd Elmessih (2012) LMANLSUR: "Overall System NL-SUR Autocorrelation Tests"

Online Help:

lmanlsur, lmhnlsur, lmnnlsur, lmcovnlsur, r2nlsur lmareg3, lmhreg3, lmnreg3, lmcovreg3, r2reg3 lmasem, lmhsem, lmnsem, lmcovsem, r2sem. (if installed).