help: ridge2sls dialog:

Title

ridge2sls: Two-Stage Least Squares (2SLS): Ridge & Weighted Regression

Table of Contents

Syntax

Description

Ridge Options

Weight Options

Weighted Variable Type Options

Options

Model Selection Diagnostic Criteria

Saved Results

References

*** Examples

Authors

Syntax

ridge2sls depvar indepvars (endog = inst) [if] [in] ,

[ ridge(orr|grr1|grr2|grr3) kr(#) dn diag

mfx(lin|log) weights(yh|yh2|abse|e2|le2|x|xi|x2|xi2) wvar(varname)

first noconstant noconexog predict(new_var) resid(new_var) ]

Description

ridge2sls estimates Two-Stage Least Squares (2SLS),
with Ridge and Weighted Regression, and computes Model Selection Diagnostic Criteria,
and Marginal Effects and Elasticities.

R2, R2 Adjusted, and F-Test, are obtained from 3 ways:

1- (Buse 1973) R2.

2- Raw Moments R2.

3- Corrected R2, if original R2 is negative.

- Adjusted R2: R2_a=1-(1-R2)*(N-1)/(N-K-1).

- F-Test=R2/(1-R2)*(N-K-1)/(K).

- Adjusted R2: R2_a=1-(1-R2)*(N-1)/(N-K-1).

Ridge Options

kr(#) Ridge k value, must be in the range (0 < k < 1).

IF kr(0) in ridge(orr, grr1, grr2, grr3), the model will be an IV-2SLS regression.

ridge(orr) : Ordinary Ridge Regression [Judge,et al(1988,p.878) eq.21.4.2].
ridge(grr1): Generalized Ridge Regression [Judge,et al(1988,p.881) eq.21.4.12].
ridge(grr2): Iterative Generalized Ridge [Judge,et al(1988,p.881) eq.21.4.12].
ridge(grr3): Adaptive Generalized Ridge [Strawderman(1978)].

ridge2sls estimates Ordinary Ridge regression as a multicollinearity remediation method.

General form of Ridge Coefficients and Covariance Matrix are:

Br = inv[X'X + kI] X'Y

Cov=Sig^2 * inv[X'X + kI] (X'X) inv[X'X + kI]

where:
Br = Ridge Coefficients Vector (k x 1).
Cov = Ridge Covariance Matrix (k x k).
Y = Dependent Variable Vector (N x 1).
X = Independent Variables Matrix (N x k).
k = Ridge Value (0 < k < 1).
I = Diagonal Matrix of Cross Product Matrix (Xs'Xs).
Xs = Standardized Variables Matrix in Deviation from Mean.
Sig2 = (Y-X*Br)'(Y-X*Br)/DF

Weight Options

wvar(varname) Weighted Variable Name

Weighted Variable Type Options

Type Options Description

weights(yh) Yh - Predicted Value

weights(yh2) Yh^2 - Predicted Value Squared

weights(abse) abs(E) - Absolute Value of Residual

weights(e2) E^2 - Residual Squared

weights(le2) log(E^2) - Log Residual Squared

weights(x) (x) Variable

weights(xi) (1/x) Inverse Variable

weights(x2) (x^2) Squared Variable

weights(xi2) (1/x^2) Inverse Squared Variable

Options

dn Use (N) divisor instead of (N-K) for Degrees of Freedom (DF)

first Display Reduced Form Equations (First Stage Regression

noconstant Exclude Constant Term from RHS Equation only

noconexog Exclude Constant Term from all Equations
(both RHS and Instrumental Equations).
Results of using noconexog option are identical to
Stata ivregress.
Including Constant Term in both RHS and Instrumental Equations
is default in ridge2sls

mfx(lin, log) functional form: Linear model (lin), or Log-Log model (log),
to compute Marginal Effects and Elasticities
- In Linear model: marginal effects are the coefficients (Bm),
and elasticities are (Es = Bm X/Y).
- In Log-Log model: elasticities are the coefficients (Es),
and the marginal effects are (Bm = Es Y/X).

predict(new_var) Predicted values variable

resid(new_var) Residuals values variable

Model Selection Diagnostic Criteria

diag Model Selection Diagnostic Criteria

- 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

ridge2sls saves the following in e():

*** Model Selection Diagnostic Criteria:
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(r2cc) Corrected R2
e(r2cc_a) adj Corrected R2
e(sig) Sigma (MSE)
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
e(mfxlin) Marginal Effect and Elasticity in Lin Form
e(mfxlog) Marginal Effect and Elasticity in Log Form

References

Damodar Gujarati (1995)
"Basic Econometrics"
3rd Edition, McGraw Hill, New York, USA.

Evagelia, Mitsaki (2011)
"Ridge Regression Analysis of Collinear Data",
http://www.stat-athens.aueb.gr/~jpan/diatrives/Mitsaki/chapter2.pdf

Greene, William (2007)
"Econometric Analysis",
6th ed., Upper Saddle River, NJ: Prentice-Hall; 387-388.

Griffiths, W., R. Carter Hill & George Judge (1993)
"Learning and Practicing Econometrics",
John Wiley & Sons, Inc., New York, USA; 602-606.

Hoerl A. E. (1962)
"Application of Ridge Analysis to Regression Problems",
Chemical Engineering Progress, 58; 54-59.

Hoerl, A. E. and R. W. Kennard (1970a)
"Ridge Regression: Biased Estimation for Non-Orthogonal Problems",
Technometrics, 12; 55-67.

Hoerl, A. E. and R. W. Kennard (1970b)
"Ridge Regression: Applications to Non-Orthogonal Problems",
Technometrics, 12; 69-82.

Hoerl, A. E. ,R. W. Kennard, & K. Baldwin (1975)
"Ridge Regression: Some Simulations",
Communications in Statistics, A, 4; 105-123.

Hoerl, A. E. and R. W. Kennard (1976)
"Ridge Regression: Iterative Estimation of the Biasing Parameter",
Communications in Statistics, A, 5; 77-88.

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

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

Marquardt D.W. (1970)
"Generalized Inverses, Ridge Regression, Biased Linear Estimation, and Nonlinear Estimation",
Technometrics, 12; 591-612.

Marquardt D.W. & R. Snee (1975)
"Ridge Regression in Practice",
The American Statistician, 29; 3-19.

Theil, Henri (1971)
"Principles of Econometrics",
John Wiley & Sons, Inc., New York, USA.

White, Halbert (1980)
"A Heteroskedasticity-Consistent Covariance Matrix Estimator and a Direct Test for Heteroskedasticity",
Econometrica, 48; 817-838.

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

Examples

clear all

sysuse ridge2sls.dta , clear

db ridge2sls

* (1) Two Stages Least Squares (2SLS)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(grr1) diag mfx(lin)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , mfx(log)

* (2) Weighted Two Stages Least Squares (W2SLS)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(yh)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(yh2)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(abse)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(e2)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(le2)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(x) wvar(x1)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(xi) wvar(x1)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(x2) wvar(x1)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , weights(xi2) wvar(x1)

* (3) Ridge Two Stages Least Squares (R2SLS)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(orr) kr(0.5) weights(x) wvar(x1)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(orr) kr(0.5)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(grr1)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(grr2)

ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(grr3)

. clear all
. sysuse ridge2sls.dta , clear
. ridge2sls y1 x1 x2 (y2 = x1 x2 x3 x4) , ridge(grr1) diag mfx(lin)

==============================================================================
* Two Stage Least Squares (2SLS)
==============================================================================
y1 = y2 + x1 + x2
------------------------------------------------------------------------------
Ridge k Value = 0.04629 | Generalized Ridge Regression
------------------------------------------------------------------------------
Sample Size = 17
Wald Test = 76.3982 | P-Value > Chi2(3) = 0.0000
F-Test = 25.4661 | P-Value > F(3 , 13) = 0.0000
(Buse 1973) R2 = 0.8526 | Raw Moments R2 = 0.9952
(Buse 1973) R2 Adj = 0.8186 | Raw Moments R2 Adj = 0.9941
Root MSE (Sigma) = 10.4595 | Log Likelihood Function = -61.7495
------------------------------------------------------------------------------
- R2h= 0.8528 R2h Adj= 0.8188 F-Test = 25.10 P-Value > F(3 , 13) 0.0000
- R2v= 0.8339 R2v Adj= 0.7956 F-Test = 21.76 P-Value > F(3 , 13) 0.0000
------------------------------------------------------------------------------
y1 | Coef. Std. Err. t P>|t| [95% Conf. Interval]
-------------+----------------------------------------------------------------
y2 | .2967317 .1638088 1.81 0.093 -.0571557 .6506192
x1 | .1904857 .494348 0.39 0.706 -.8774883 1.25846
x2 | -.9198076 .2468019 -3.73 0.003 -1.452991 -.3866245
_cons | 137.0235 55.16998 2.48 0.027 17.83605 256.211
------------------------------------------------------------------------------
* Y = LHS Dependent Variable: 1 = y1
* Yi = RHS Endogenous Variables: 1 = y2
* Xi = RHS Included Exogenous Vars: 2 = x1 x2
* Xj = RHS Excluded Exogenous Vars: 2 = x3 x4
* Z = Overall Instrumental Vars: 4 = x1 x2 x3 x4

==============================================================================
* 2SLS-IV Model Selection Diagnostic Criteria
==============================================================================
- Log Likelihood Function LLF = -61.7495
---------------------------------------------------------------------------
- Akaike Information Criterion (1974) AIC = 133.9348
- Akaike Information Criterion (1973) Log AIC = 4.8974
---------------------------------------------------------------------------
- Schwarz Criterion (1978) SC = 162.9435
- Schwarz Criterion (1978) Log SC = 5.0934
---------------------------------------------------------------------------
- Amemiya Prediction Criterion (1969) FPE = 135.1436
- Hannan-Quinn Criterion (1979) HQ = 136.5705
- Rice Criterion (1984) Rice = 158.0251
- Shibata Criterion (1981) Shibata = 123.0299
- Craven-Wahba Generalized Cross Validation (1979) GCV = 143.0641
------------------------------------------------------------------------------

* Marginal Effect - Elasticity: Linear *

+---------------------------------------------------------------------------+
| Variable | Marginal_Effect(B) | Elasticity(Es) | Mean |
|------------+--------------------+--------------------+--------------------|
| y2 | 0.2967 | 0.3351 | 146.8118 |
| x1 | 0.1905 | 0.1509 | 102.9824 |
| x2 | -0.9198 | -0.5399 | 76.3118 |
+---------------------------------------------------------------------------+
Mean of Dependent Variable = 130.0118

Authors

- Emad Abd Elmessih Shehata
Professor (PhD Economics)
Agricultural Research Center - Agricultural Economics Research Institute - Egypt
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

RIDGE2SLS Citation

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

RIDGE2SLS: "Two-Stage Least Squares (2SLS): Ridge & Weighted Regression"

Online Help:

* Econometric Regression Models:

* (1) (OLS) * Ordinary Least Squares Regression Models:
olsreg OLS Econometric Ridge & Weighted Regression Models: Stata Module Toolkit
ridgereg OLS Ridge Regression Models
gmmreg OLS Generalized Method of Moments (GMM): Ridge & Weighted Regression
chowreg OLS Structural Change Regressions and Chow Test
---------------------------------------------------------------------------
* (2) (2SLS-IV) * Two-Stage Least Squares & Instrumental Variables Regression Models:
reg2 2SLS-IV Econometric Ridge & Weighted Regression Models: Stata Module Toolkit
gmmreg2 2SLS-IV Generalized Method of Moments (GMM): Ridge & Weighted Regression
limlreg2 Limited-Information Maximum Likelihood (LIML) IV Regression
meloreg2 Minimum Expected Loss (MELO) IV Regression
ridgereg2 Ridge 2SLS-LIML-GMM-MELO-Fuller-kClass IV Regression
ridge2sls Two-Stage Least Squares Ridge Regression
ridgegmm Generalized Method of Moments (GMM) IV Ridge Regression
ridgeliml Limited-Information Maximum Likelihood (LIML) IV Ridge Regression
ridgemelo Minimum Expected Loss (MELO) IV Ridge Regression
---------------------------------------------------------------------------
* (3) * Panel Data Regression Models:
regxt Panel Data Econometric Ridge & Weighted Regression Models: Stata Module Toolkit
xtregdhp Han-Philips (2010) Linear Dynamic Panel Data Regression
xtregam Amemiya Random-Effects Panel Data: Ridge & Weighted Regression
xtregbem Between-Effects Panel Data: Ridge & Weighted Regression
xtregbn Balestra-Nerlove Random-Effects Panel Data: Ridge & Weighted Regression
xtregfem Fixed-Effects Panel Data: Ridge & Weighted Regression
xtregmle Trevor Breusch MLE Random-Effects Panel Data: Ridge & Weighted Regression
xtregrem Fuller-Battese GLS Random-Effects Panel Data: Ridge & Weighted Regression
xtregsam Swamy-Arora Random-Effects Panel Data: Ridge & Weighted Regression
xtregwem Within-Effects Panel Data: Ridge & Weighted Regression
xtregwhm Wallace-Hussain Random-Effects Panel Data: Ridge & Weighted Regression
xtreghet MLE Random-Effects Multiplicative Heteroscedasticity Panel Data Regression
---------------------------------------------------------------------------
* (4) (MLE) * Maximum Likelihood Estimation Regression Models:
mlereg MLE Econometric Regression Models: Stata Module Toolkit
mleregn MLE Normal Regression
mleregln MLE Log Normal Regression
mlereghn MLE Half Normal Regression
mlerege MLE Exponential Regression
mleregle MLE Log Exponential Regression
mleregg MLE Gamma Regression
mlereglg MLE Log Gamma Regression
mlereggg MLE Generalized Gamma Regression
mlereglgg MLE Log Generalized Gamma Regression
mleregb MLE Beta Regression
mleregev MLE Extreme Value Regression
mleregw MLE Weibull Regression
mlereglw MLE Log Weibull Regression
mleregilg MLE Inverse Log Gauss Regression
---------------------------------------------------------------------------
* (5) * Autocorrelation Regression Models:
autoreg Autoregressive Least Squares Regression Models: Stata Module Toolkit
alsmle Beach-Mackinnon AR(1) Autoregressive Maximum Likelihood Estimation Regression
automle Beach-Mackinnon AR(1) Autoregressive Maximum Likelihood Estimation Regression
autopagan Pagan AR(p) Conditional Autoregressive Least Squares Regression
autoyw Yule-Walker AR(p) Unconditional Autoregressive Least Squares Regression
autopw Prais-Winsten AR(p) Autoregressive Least Squares Regression
autoco Cochrane-Orcutt AR(p) Autoregressive Least Squares Regression
autofair Fair AR(1) Autoregressive Least Squares Regression
---------------------------------------------------------------------------
* (6) * Heteroscedasticity Regression Models:
hetdep MLE Dependent Variable Heteroscedasticity
hetmult MLE Multiplicative Heteroscedasticity Regression
hetstd MLE Standard Deviation Heteroscedasticity Regression
hetvar MLE Variance Deviation Heteroscedasticity Regression
glsreg Generalized Least Squares Regression
---------------------------------------------------------------------------
* (7) * Non Normality Regression Models:
robgme MLE Robust Generalized Multivariate Error t Distribution
bcchreg Classical Box-Cox Multiplicative Heteroscedasticity Regression
bccreg Classical Box-Cox Regression
bcereg Extended Box-Cox Regression
---------------------------------------------------------------------------
* (8) (NLS) * Nonlinear Least Squares Regression Regression Models:
autonls Non Linear Autoregressive Least Squares Regression
qregnls Non Linear Quantile Regression
---------------------------------------------------------------------------
* (9) * Logit Regression Models:
logithetm Logit Multiplicative Heteroscedasticity Regression
mnlogit Multinomial Logit Regression
---------------------------------------------------------------------------
* (10) * Probit Regression Models:
probithetm Probit Multiplicative Heteroscedasticity Regression
mnprobit Multinomial Probit Regression
---------------------------------------------------------------------------
* (11) * Tobit Regression Models:
tobithetm Tobit Multiplicative Heteroscedasticity Regression
---------------------------------------------------------------------------
* Multicollinearity Tests:
lmcol OLS Multicollinearity Diagnostic Tests
fgtest Farrar-Glauber Multicollinearity Chi2, F, t Tests
theilr2 Theil R2 Multicollinearity Effect
---------------------------------------------------------------------------