```-------------------------------------------------------------------------------
help: meloreg2                                                        dialog: m
> eloreg2
-------------------------------------------------------------------------------

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

meloreg2: Minimum Expected Loss (MELO) Instrumental Variables Regression

+-------------------+

Syntax
Options
Weight Options
Weighted Variable Type Options
Description
Saved Results
References

*** Examples

Author

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

meloreg2 depvar indepvars (endog = inst) [if] [in] , [ noconstant noconexog
dn

weights(type) wvar(varname) predict(new_var) resid(new_var) ]

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

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 and ivreg2.
Including Constant Term in both RHS and Instrumental
Equations is default in meloreg2

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

predict(new_var)  Predicted values variable

resid(new_var)    Residuals values variable

+----------------+
----+ 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

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

meloreg2 estimate Minimum Expected Loss (MELO) Instrumental Variables
Regression. meloreg2 dont deal with Missing values (.) in variables

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

meloreg2 saves the following in e():

e(f)            F Test
e(fp)           F Test P-Value
e(N)            Number of obs
e(r2c)          R2
e(r2cc)         Corrected R2
e(r2u)          Raw R2
e(sig)          Sigma (MSE)
e(wald)         Wald Test
e(waldp)        Wald Test P-Value

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

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

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.

Park, S. (1982) "Some Sampling Properties of Minimum Expected Loss (MELO)
Estimators of Structural Coefficients", J. Econometrics, Vol. 18, No.
2, April,; 295-311.

Zellner, Arnold (1978) "Estimation of Functions of Population Means and
Regression Coefficients Including Structural Coefficients: A Minimum
Expected Loss (MELO) Approach", J. Econometrics, Vol. 8,; 127-158.

Zellner, Arnold & S. Park (1979) "Minimum Expected Loss (MELO) Estimators
for Functions of Parameters and Structural Coefficients of
Econometric Models", J. Am. Stat. Assoc., Vol. 74; 185-193.

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

clear all

sysuse meloreg2.dta , clear

db meloreg2

meloreg2 y1 x1 x2 (y2 = x1 x2 x3 x4)

ereturn list

tsset t

gen y1_1=L.y1

*** replace missing value in first observation with (0).
replace y1_1= 0 if y1_1 == .

meloreg2 y1 y1_1 x1 x2 (y2 = y1_1 x1 x2 x3 x4)

-------------------------------------------------------------------------------

* Weighted MELO (WMELO)

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

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

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

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

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

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

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

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

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

. clear all
. sysuse meloreg2.dta , clear
. meloreg2 y1 x1 x2 (y2 = x1 x2 x3 x4)
==============================================================================
* Minimum Expected Loss (MELO) Instrumental Variables Regression)
==============================================================================
y1 = y2 + x1 + x2
------------------------------------------------------------------------------
K - Class (MELO) Value  =   0.72727
Number of Obs    =         17
Wald Test        =    81.2132         P-Value > Chi2(3)        =     0.0000
F Test           =    27.0711         P-Value > F(3 , 13)      =     0.0000
R-squared        =     0.8616         Raw R2                   =     0.9955
Root MSE (Sigma) =    10.1364         Log Likelihood Function  =   -61.2160
------------------------------------------------------------------------------
y1 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
y2 |   .1951374   .2125644     0.92   0.375    -.2640801    .6543549
x1 |   .3229772   .5276595     0.61   0.551    -.8169618    1.462916
x2 |  -1.101973   .3260175    -3.38   0.005    -1.806291   -.3976546
_cons |   152.1958   58.82774     2.59   0.023     25.10624    279.2854
------------------------------------------------------------------------------

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

Assistant Professor
Agricultural Research Center - Agricultural Economics Research Institute - Eg
> ypt
WebPage at IDEAS:       http://ideas.repec.org/f/psh494.html
WebPage at EconPapers:  http://econpapers.repec.org/RAS/psh494.htm

+-------------------+
----+ meloreg2 Citation +------------------------------------------------