Grocer Function
NAME
iv1 - instrumental variables
CALLING SEQUENCE
[rtsls]=iv1(y,y1,x1,xall)
PARAMETERS
Input
-
y = dependent variable vector (nobs x 1)
-
y1 = endogenous variables matrix (nobs x g) for this equation
-
xexog = exogenous variables matrix for this equation
-
xall = instruments for variables y1
Output
-
results = a structure tlist with
- rtsls ('meth') = 'tsls'
- rtsls ('nobs') = nobs
- rtsls ('nendog') = # of endogenous
- rtsls ('nexog') = # of exogenous
- rtsls ('nvar') = # of endogenous + # of exogenous
- rtsls ('y') = y data vector
- rtsls ('beta') = bhat estimates
- rtsls ('tstat') = t-statistics
- rtsls ('yhat') = yhat predicted values
- rtsls ('resid') = residuals
- rtsls ('residtsls') = residuals calculated with the endogenous variables replaced by their regression from
first stage estimation
- rtsls ('sigu') = e'*e
- rtsls ('sige') = e'*e/(n-k)
- rtsls ('dw') = Durbin-Watson Statistic
- rtsls ('prescte') = boolean indicating the presence or
absence of a constant in the regression
- rtsls ('rsqr') = rsquared
- rtsls ('rbar') = rbar-squared
- rtsls ('f') = F-stat for the nullity of coefficients
other than the constant
- rtsls ('pvaluef') = its significance level
- rtsls ('grsqr') = generalized rsquared (that is which takes into account the endogeneity of some explicative variables)
DESCRIPTION
Produces instrumental variables estimation when all variables are in vector or matrix form.
EXAMPLE
riv=iv1(grocer_y,grocer_endo,grocer_exo,grocer_ivar));
This example, taken from iv, provides the instrumental variables estimation for the regression of endogenous variable grocer_y on the matrix of variables supposed to be correlated with the residuals, grocer_endo, and the matrix of variables supposed to be uncorrelated with the residuals, grocer_exo: grocer_endo being endogenous, it is instrumented by grocer_ivar. This is a low level function: for empirical uses, the user can perform the same, and much more, with iv.
AUTHOR
Eric Dubois 2002