TSLS (variable input)

Version 1.0.0.0 (962 octets) par raffaele
this function allows multiple input arguments for a TSLS regression
236 téléchargements
Mise à jour 17 nov. 2014

Afficher la licence

(written on matlab 2014, proved on matlab 2012 and 2010, and worked)
This function allows multiple input arguments for a TSLS regression, selecting which endogenous variables are going to be instrumented by a selected group of instruments. A TSLS is necessary when at least one of the endogenous variables is correlated with the error, and we replace these endogenous variables with an estimation made with the instrumental variables. In this function a general number of endogenous variables and the relative instruments to use can be selected . Then the function displays the coefficients of every first stage regression (of X_endogenous and Z_instruments), which allows to see if the instruments are relevant.
The basic algorithm is the following:
1st stage: gamma=inv(z'z)*(z'x)
x_hat=z*gamma
2nd stage: beta=inv(x_hat'x_hat)*(x_hat'y).
written by Raffaele Balzano, Luiss University, Rome

Citation pour cette source

raffaele (2024). TSLS (variable input) (https://www.mathworks.com/matlabcentral/fileexchange/48482-tsls-variable-input), MATLAB Central File Exchange. Récupéré le .

Compatibilité avec les versions de MATLAB
Créé avec R2014a
Compatible avec toutes les versions
Plateformes compatibles
Windows macOS Linux
Catégories
En savoir plus sur Statistics and Machine Learning Toolbox dans Help Center et MATLAB Answers

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Publié le Notes de version
1.0.0.0