-------------------------------------------------------------------------------
help: diagreg                                                   dialog: diagreg
-------------------------------------------------------------------------------

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

diagreg: OLS Model Selection Diagnostic Criteria

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

Syntax Options Description Saved Results References

*** Examples

Author

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

diagreg depvar indepvars [if] [in] , [ noconstant coll ]

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

noconstant suppress constant term

coll Keep Collinear Variables

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

diagreg computes OLS model selection diagnostic criteria, after OLS regression.

- Log Likelihood Function LLF - Akaike Information Criterion (1974) AIC - Akaike Information Criterion (1973) Log AIC - Schwarz Criterion (1978) SC - Schwarz Criterion (1978) Log SC - Amemiya Prediction Criterion (1969) FPE - Hannan-Quinn Criterion (1979) HQ - Rice Criterion (1984) Rice - Shibata Criterion (1981) Shibata - Craven-Wahba Generalized Cross Validation (1979) GCV

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

diagreg saves the following in e():

Scalars e(N) number of observations e(r2bu) R-squared (Buse 1973) e(r2bu_a) R-squared Adj (Buse 1973) e(r2raw) Raw Moments R2 e(r2raw_a) Raw Moments R2 Adj e(f) F-test e(fp) F-test P-Value e(wald) Wald-test e(waldp) Wald-test P-Value e(r2h) R2 Between Predicted (Yh) and Observed DepVar (Y) e(r2h_a) Adjusted r2h e(fh) F-test due to r2h e(fhp) F-test due to r2h P-Value e(r2v) R2 Variance Ratio Between Predicted (Yh) and Observed DepVar > (Y) e(r2v_a) Adjusted r2v e(fv) F-test due to r2v e(fvp) F-test due to r2v P-Value e(sig) Root MSE (Sigma)

e(llf) Log Likelihood Function LLF e(aic) Akaike Information Criterion (1974) AIC e(laic) Akaike Information Criterion (1973) Log AIC e(sc) Schwarz Criterion (1978) SC e(lsc) Schwarz Criterion (1978) Log SC e(fpe) Amemiya Prediction Criterion (1969) FPE e(hq) Hannan-Quinn Criterion (1979) HQ e(rice) Rice Criterion (1984) Rice e(shibata) Shibata Criterion (1981) Shibata e(gcv) Craven-Wahba Generalized Cross Validation (1979) GCV

Matrixes e(b) coefficient vector e(V) variance-covariance matrix of the estimators

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

Judge, Georege, R. Carter Hill, William . E. Griffiths, Helmut Lutkepohl, & Tsoung-Chao Lee (1988) "Introduction To The Theory And Practice Of Econometrics", 2nd ed., John Wiley & Sons, Inc., New York, USA.

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

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

clear all

db diagreg

sysuse diagreg.dta, clear

diagreg y x1 x2

ereturn list

============================================================================== * Ordinary Least Squares (OLS) ============================================================================== y = x1 + x2 ------------------------------------------------------------------------------ Sample Size = 17 Wald Test = 273.3662 | P-Value > Chi2(2) = 0.0000 F-Test = 136.6831 | P-Value > F(2 , 14) = 0.0000 (Buse 1973) R2 = 0.9513 | Raw Moments R2 = 0.9986 (Buse 1973) R2 Adj = 0.9443 | Raw Moments R2 Adj = 0.9984 Root MSE (Sigma) = 5.5634 | Log Likelihood Function = -51.6471 ------------------------------------------------------------------------------ - R2h= 0.9513 R2h Adj= 0.9443 F-Test = 136.68 P-Value > F(2 , 14) 0.0000 - R2v= 0.9513 R2v Adj= 0.9443 F-Test = 136.68 P-Value > F(2 , 14) 0.0000 ------------------------------------------------------------------------------ y | Coef. Std. Err. t P>|t| [95% Conf. Interval] -------------+---------------------------------------------------------------- x1 | 1.061709 .2666739 3.98 0.001 .4897506 1.633668 x2 | -1.382986 .0838143 -16.50 0.000 -1.562749 -1.203222 _cons | 130.7066 27.09429 4.82 0.000 72.59515 188.8181 ------------------------------------------------------------------------------

============================================================================== *** OLS Model Selection Diagnostic Criteria ============================================================================== - Log Likelihood Function LLF = -51.6471 --------------------------------------------------------------------------- - Akaike Information Criterion (1974) AIC = 36.2772 - Akaike Information Criterion (1973) Log AIC = 3.5912 --------------------------------------------------------------------------- - Schwarz Criterion (1978) SC = 42.0234 - Schwarz Criterion (1978) Log SC = 3.7382 --------------------------------------------------------------------------- - Amemiya Prediction Criterion (1969) FPE = 36.4129 - Hannan-Quinn Criterion (1979) HQ = 36.8113 - Rice Criterion (1984) Rice = 39.3921 - Shibata Criterion (1981) Shibata = 34.4851 - Craven-Wahba Generalized Cross Validation (1979) GCV = 37.5833 ------------------------------------------------------------------------------

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

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

+------------------+ ----+ DIAGREG Citation +-------------------------------------------------

Shehata, Emad Abd Elmessih (2012) DIAGREG: "OLS Model Selection Diagnostic Criteria"

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

http://econpapers.repec.org/software/bocbocode/s457358.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) ---------------------------------------------------------------------------