instrumental variables
[riv]=iv(namey,arg1,...,argn)
* 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
* 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