-------------------------------------------------------------------------------
help: lmhcwnl                                                   dialog: lmhcwnl
-------------------------------------------------------------------------------

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

lmhcwnl: NLS Heteroscedasticity Cook-Weisberg Test

+-------------------+ ----+ Table of Contents +------------------------------------------------

Syntax Options Description Saved Results References

*** Examples

Authors

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

lmadwnl depvar [if] [in] [weight] , fun(expression) [ initial(init_val) variables(varlist) vce(vcetype ]

+---------+ ----+ Options +----------------------------------------------------------

depvar Dependent Variable

variables(varlist) Independent Variables in model

initial(init_val) Parameters (initial) Starting Values

fun(expression) RHS Mathematical Expression

SE/Robust vce(vcetype) vcetype may be gnr, robust, cluster clustvar, bootstrap, jackknife, hac kernel, hc2, or hc3

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

lmhcwnl computes Non Linear Least Squares Heteroscedasticity Cook-Weisberg and King Tests.

Ho: Homoscedasticity - Ha: Heteroscedasticity - Cook-Weisberg LM Test E2/Sig2 = Yh - Cook-Weisberg LM Test E2/Sig2 = X

*** Single Variable Tests: - Cook-Weisberg LM Test: E2/Sig2 = xi

*** Single Variable Tests: - King LM Test: xi

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

lmhcwnl saves the following in e():

e(lmhcw1) Cook-Weisberg LM Test E2/Sig2n = Yh e(lmhcw1p) Cook-Weisberg LM Test E2/Sig2n = Yh P-Value e(lmhcw2) Cook-Weisberg LM Test E2/Sig2n = X e(lmhcw2p) Cook-Weisberg LM Test E2/Sig2n = X P-Value

e(lmhcw_xi) Cook-Weisberg LM Single Variable Test e(lmhcwp_xi) Cook-Weisberg LM Single Variable Test P-Value

e(lmhq_xi) King LM Single Variable Test e(lmhqp_xi) King LM Single Variable Test P-Value

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

Cook, R.D., & S. Weisberg (1983) "Diagnostics for Heteroscedasticity in Regression", Biometrica 70; 1-10.

Harvey, Andrew (1990) "The Econometric Analysis of Time Series", 2nd edition, MIT Press, Cambridge, Massachusetts.

Maddala, G. (1992) "Introduction to Econometrics", 2nd ed., Macmillan Publishing Company, New York, USA.

Szroeter, J. (1978) "A Class of Parametric Tests for Heteroscedasticity in Linear Econometric Models", Econometrica, 46; 1311-28.

William E. Griffiths, R. Carter Hill and George G. Judge (1993) "Learning and Practicing Econometrics", John Wiley & Sons, Inc., New York, USA; 721-725.

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

clear all

sysuse lmhcwnl.dta , clear

gen ly=ln(y)

lmhcwnl ly , fun({B0}+{B1}*k+{B2}*l)

lmhcwnl ly, fun({B}-({H}/{R})*ln({D}*l^(-{R})+(1-{D})*k^(-{R}))) in(B 1 H 1 R 1 > D 0.5) -------------------------------------------------------------------------------

. clear all . sysuse lmhcwnl.dta , clear . gen ly=ln(y) . lmhcwnl ly, fun({B}-({H}/{R})*ln({D}*l^(-{R})+(1-{D})*k^(-{R}))) in(B 1 H 1 R > 1 D 0.5)

Source | SS df MS -------------+------------------------------ Number of obs = 30 Model | 59.529144 3 19.843048 R-squared = 0.9713 Residual | 1.7610762 26 .0677337 Adj R-squared = 0.9680 -------------+------------------------------ Root MSE = .260257 Total | 61.2902202 29 2.11345587 Res. dev. = .0781436

------------------------------------------------------------------------------ ly | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- /B | .1244908 .0783444 1.59 0.124 -.0365483 .28553 /H | 1.012594 .0506832 19.98 0.000 .9084134 1.116775 /R | 3.010934 2.323389 1.30 0.206 -1.764861 7.786728 /D | .3366735 .1361129 2.47 0.020 .0568895 .6164575 ------------------------------------------------------------------------------ Parameter B taken as constant term in model & ANOVA table

============================================================================== *** NLS Heteroscedasticity Cook-Weisberg Test ============================================================================== Ho: Homoscedasticity - Ha: Heteroscedasticity ------------------------------------------------------------------------------ - Cook-Weisberg LM Test E2/Sig2 = Yh = 0.7331 P-Value > Chi2(1) 0.3919 - Cook-Weisberg LM Test E2/Sig2 = X = 3.3748 P-Value > Chi2(4) 0.4972 ------------------------------------------------------------------------------ *** Single Variable Tests: - Cook-Weisberg LM Test: E2/Sig2 = B = 1.3959 P-Value > Chi2(1) 0.2374 - Cook-Weisberg LM Test: E2/Sig2 = H = 0.7331 P-Value > Chi2(1) 0.3919 - Cook-Weisberg LM Test: E2/Sig2 = R = 1.3267 P-Value > Chi2(1) 0.2494 - Cook-Weisberg LM Test: E2/Sig2 = D = 0.5681 P-Value > Chi2(1) 0.4510 ------------------------------------------------------------------------------ *** Single Variable Tests: - King LM Test: B = 3.2524 P-Value > Chi2(1) 0.0713 - King LM Test: H = 0.4416 P-Value > Chi2(1) 0.5063 - King LM Test: R = 1.6471 P-Value > Chi2(1) 0.1994 - King LM Test: D = 0.2638 P-Value > Chi2(1) 0.6075 ------------------------------------------------------------------------------

+---------+ ----+ Authors +----------------------------------------------------------

- Emad Abd Elmessih Shehata Professor (PhD Economics) 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

- Sahra Khaleel A. Mickaiel Professor (PhD Economics) Cairo University - Faculty of Agriculture - Department of Economics - Egypt Email: sahra_atta@hotmail.com WebPage: http://sahraecon.110mb.com/stata.htm WebPage at IDEAS: http://ideas.repec.org/f/pmi520.html WebPage at EconPapers: http://econpapers.repec.org/RAS/pmi520.htm

+------------------+ ----+ LMHCWNL Citation +-------------------------------------------------

Shehata, Emad Abd Elmessih & Sahra Khaleel A. Mickaiel (2012) LMHCWNL: "NLS Heteroscedasticity Cook-Weisberg Test"

Online Help:

* Heteroscedasticity Tests:

* (1) (OLS) * Ordinary Least Squares Tests: lmhreg OLS Heteroscedasticity Tests lmharch OLS Heteroscedasticity Engle (ARCH) Test lmhcw OLS Heteroscedasticity Cook-Weisberg Test lmhgl OLS Heteroscedasticity Glejser Test lmhharv OLS Heteroscedasticity Harvey Test lmhhp OLS Heteroscedasticity Hall-Pagan Test lmhmss OLS Heteroscedasticity Machado-Santos-Silva Test lmhwald OLS Heteroscedasticity Wald Test lmhwhite OLS Heteroscedasticity White Test --------------------------------------------------------------------------- * (2) (NLS) * Non Linear Least Squares Tests: lmhnls Non Linear Least Squares Heteroscedasticity Tests lmharchnl NLS Heteroscedasticity Engle (ARCH) Test lmhcwnl NLS Heteroscedasticity Cook-Weisberg Test lmhglnl NLS Heteroscedasticity Glejser Test lmhharvnl NLS Heteroscedasticity Harvey Test lmhhpnl NLS Heteroscedasticity Hall-Pagan Test lmhmssnl NLS Heteroscedasticity Machado-Santos-Silva Test lmhwaldnl NLS Heteroscedasticity Wald Test lmhwhitenl NLS Heteroscedasticity White Test --------------------------------------------------------------------------- * (3) (MLE) * Maximum Likelihood Estimation Tests: lmhmle MLE Heteroscedasticity Tests lmharchml MLE Heteroscedasticity Engle (ARCH) Test lmhcwml MLE Heteroscedasticity Cook-Weisberg Test lmhglml MLE Heteroscedasticity Glejser Test lmhharvml MLE Heteroscedasticity Harvey Test lmhhpml MLE Heteroscedasticity Hall-Pagan Test lmhmssml MLE Heteroscedasticity Machado-Santos-Silva Test lmhwaldml MLE Heteroscedasticity Wald Test lmhwhiteml MLE Heteroscedasticity White Test --------------------------------------------------------------------------- * (4) (2SLS-IV) * Two-Stage Least Squares & Instrumental Variables Tests: lmhreg2 2SLS-IV Heteroscedasticity Tests lmharch2 2SLS-IV Heteroscedasticity Engle (ARCH) Test lmhcw2 2SLS-IV Heteroscedasticity Cook-Weisberg Test lmhgl2 2SLS-IV Heteroscedasticity Glejser Test lmhharv2 2SLS-IV Heteroscedasticity Harvey Test lmhhp2 2SLS-IV Heteroscedasticity Hall-Pagan Test lmhmss2 2SLS-IV Heteroscedasticity Machado-Santos-Silva Test lmhwald2 2SLS-IV Heteroscedasticity Wald Test lmhwhite2 2SLS-IV Heteroscedasticity White Test --------------------------------------------------------------------------- * (5) Panel Data Tests: lmhxt Panel Data Heteroscedasticity Tests lmhgwxt Panel Data Groupwise Heteroscedasticity Tests ghxt Panel Groupwise Heteroscedasticity Tests lmhlmxt Panel Data Groupwise Heteroscedasticity Breusch-Pagan LM Test lmhlrxt Panel Data Groupwise Heteroscedasticity Greene LR Test lmharchxt Panel Data Heteroscedasticity Engle (ARCH) Test lmhcwxt Panel Data Heteroscedasticity Cook-Weisberg Test lmhglxt Panel Data Heteroscedasticity Glejser Test lmhharvxt Panel Data Heteroscedasticity Harvey Test lmhhpxt Panel Data Heteroscedasticity Hall-Pagan Test lmhmssxt Panel Data Heteroscedasticity Machado-Santos-Silva Test lmhwaldxt Panel Data Heteroscedasticity Wald Test lmhwhitext Panel Data Heteroscedasticity White Test --------------------------------------------------------------------------- * (6) (3SLS-SUR) * Simultaneous Equations Tests: lmareg3 (3SLS-SUR) Overall System Autocorrelation Tests lmhreg3 (3SLS-SUR) Overall System Heteroscedasticity Tests lmnreg3 (3SLS-SUR) Overall System Non Normality Tests lmcovreg3 (3SLS-SUR) Breusch-Pagan Diagonal Covariance Matrix r2reg3 (3SLS-SUR) Overall System R2, F-Test, and Chi2-Test diagreg3 (3SLS-SUR) Overall System ModeL Selection Diagnostic Criteria --------------------------------------------------------------------------- * (7) (SEM-FIML) * Structural Equation Modeling Tests: lmasem (SEM-FIML) Overall System Autocorrelation Tests lmhsem (SEM-FIML) Overall System Heteroscedasticity Tests lmnsem (SEM-FIML) Overall System Non Normality Tests lmcovsem (SEM-FIML) Breusch-Pagan Diagonal Covariance Matrix Test r2sem (SEM-FIML) Overall System R2, F-Test, and Chi2-Test diagsem (SEM-FIML) Overall System ModeL Selection Diagnostic Criteria --------------------------------------------------------------------------- * (8) (NL-SUR) * Non Linear Seemingly Unrelated Regression Tests: lmanlsur (NL-SUR) Overall System Autocorrelation Tests lmhnlsur (NL-SUR) Overall System Heteroscedasticity Tests lmnnlsur (NL-SUR) Overall System Non Normality Tests lmcovnlsur (NL-SUR) Breusch-Pagan Diagonal Covariance Matrix Test r2nlsur (NL-SUR) Overall System R2, F-Test, and Chi2-Test diagnlsur (NL-SUR) Overall System ModeL Selection Diagnostic Criteria --------------------------------------------------------------------------- * (9) (VAR) * Vector Autoregressive Model Tests: lmavar (VAR) Overall System Autocorrelation Tests lmhvar (VAR) Overall System Heteroscedasticity Tests lmnvar (VAR) Overall System Non Normality Tests lmcovvar (VAR) Breusch-Pagan Diagonal Covariance Matrix Test r2var (VAR) Overall System R2, F-Test, and Chi2-Test diagvar (VAR) Overall System ModeL Selection Diagnostic Criteria ---------------------------------------------------------------------------