twosls — Two-Stage Least-squares Regression
[results]=twosls(arg1, ,argn)
argi : arguments which can be:
- an equation of the following form:
'vary=coef1*varx1+ +coefi*varxi'
where:
* coefi = the name of a coefficient
* varxi = the name of a variable
- 'coef=coef1;coef2; coefn' where coef1, ,coefn are the names of the coefficients in the system (optional; default: 'coef=a1; ,an')
- 'endo =[endo1; ;endon]' where endo1, ,endon are the names of the endogenous variables (optional; necessary if the names of the endogenous variables in the rhs of the equations are not the same as those of the lhs; default: the names of all the lhs sides of the equations)
- 'noprint' if you do not want to print the results
- the string 'dropna' if the user wants to remove the NA values from the data
results =a results tlist with:
- results('meth') = 'tsls'
- results('namecoef') = the matrix of the names of the coefficients
- results('riv1'), ,results('rivn) = the results of the iv estimation for each equation (see iv for more details)