<< invxpx Single equation regressions iv1 >>

Grocer >> Single equation regressions > iv

iv

instrumental variables

CALLING SEQUENCE

[riv]=iv(namey,arg1,...,argn)

PARAMETERS

Input

* namey = dependent variable vector (nobs x 1)

* argi is either

  - the string 'exo=[var1;var2;...,vark]' where var1, var2,..., vark are exogenous variables which are therefore not instrumented

  - the string 'endo=[var1;var2;...,varl]' where var1, var2,..., varl are endogenous variables which are therefore instrumented

  - the string 'ivar=[var1;var2;...,varm]' where var1, var2,..., varm are the instruments

  - the string 'noprint' if the user doesn't want to display the results of the regression

 

Output

* results = a structure tlist with

  - riv('meth') = 'iv'

  - riv('nobs') = nobs

  - riv('nendog') = # of endogenous

  - riv('nexog') = # of exogenous

  - riv('nvar') = # of endogenous + # of exogenous

  - riv('y') = y data vector

  - riv('beta') = bhat estimates

  - riv('tstat') = t-statistics

  - riv('yhat') = yhat predicted values

  - riv('resid') = residuals

  - riv('residtsls') = residuals calculated with the endogenous variables replaced by their regression from first stage estimation

  - riv('sigu') = e'*e

  - riv('sige') = e'*e/(n-k)

  - riv('dw') = Durbin-Watson Statistic

  - riv('prescte') = boolean indicating the presence or absence of a constant in the regression

  - riv('rsqr') = rsquared

  - riv('rbar') = rbar-squared

  - riv('f') = F-stat for the nullity of coefficients other than the constant

  - riv('pvaluef') = its significance level

  - riv('grsqr') = generalized rsquared (that is which takes into account the endogeneity of some explicative variables)

  - riv('prests') = boolean indicating the presence or absence of a time series in the regression

  - riv('namey') = name of the y variable

  - riv('namex') = name of the x variables

  - riv('nameinst') = name of the instruments

  - riv('bounds') = if there is a timeseries in the regression, the bounds of the regression

DESCRIPTION

Computes instrumental variables estimation for a single equation. Variables can be ts, vectors or even matrices. Explicative variables enter either the "list" of instrumented variables ('endo=[var1;var2;...,varl]') or the list of exogenous variables ('exo=[var1;var2;...,vark]').

EXAMPLE

x1 = rand(200,1,'n');
x2 = rand(200,1,'n');
 
y1 = zeros(200,1);
y2 = zeros(200,1);
evec = rand(200,1,'n');
//
// create simultaneously determined variables y1,y2
y1 = 1+x1+evec;
y2 = 1+y1+x2+evec;
 
iv('y2','endo=y1','exo=const;x2','ivar=const;x1;x2');

AUTHOR

Eric Dubois 2002

Report an issue
<< invxpx Single equation regressions iv1 >>