File Exchange

image thumbnail

Toolkit on Econometrics and Economics Teaching

version 1.0 (6.33 MB) by

Many MATLAB routines related to econometrics, statistics and introductory economics teaching.

4.33333
10 Ratings

49 Downloads

Updated

View License

I have about a hundred MATLAB routines related to econometrics, statistics and introductory economics teaching, which are written mostly in my spare time in the past years. Most of these MATLAB functions / scripts are supplied with a graphic user interface so that so you may estimate the model with the mouse clicking. I would like to share these codes with every interested researcher, instructor and student.

This lump-sum package reflects revision up to August 2011. Since I receive feedbacks from users from time to time, I update those codes and post them program by program on my personal website. For the latest version, please visit www.public.iastate.edu/~hqi/toolkit.html

Though I made efforts to check the correctness of those codes before I posted them, due to the large quantity of the codes, there might be some errors remaining. If you are aware of bugs or imperfections of these codes, please let me know. I appreciate your comments and suggestions.

Here is a list of the packages:
-------------------------------------
Bayesian Econometrics Tools
-------------------------------------
* Bayesian Linear Regression
* Bayesian Regression with flexible disturbance specifications
* Bayesian Regime Switch Regression
* Bayesian Regression with Restricted Parameters
* Bayesian Seemingly Unrelated Regression (SUR)
* Bayesian Vector AutoRegression (VAR)
* Bayesian Endogenous Regressors and Instruments
* Bayesian Probit and Logit Model
* Bayesian Tobit Model
* Bayesian Panel Data Analysis
* Bayesian Stochastic Search Variable Selection
* Bayesian Highest Posterior Density (HPD) Region
* Bayesian Marginal Likelihood of Linear Regression Model

-------------------------------------
Microeconometrics Tools (Classical Inference)
-------------------------------------
* Ordinary Least Squares (OLS) and More
* Baseline Logit and Probit Model
* Unordered Logit Model with RUM
* Tobit Model of several varieties
* Illustration of Expectation—Maximization (EM) Algorithm
* Aggregated Covariate Data Model
* Bootstrap Bias Correction with MIV

-------------------------------------
Macroeconometrics Tools (Classical Inference)
-------------------------------------
* Generalized Method of Moments (GMM)
* Panel Data Analysis: Fixed and Random Effects, Two-way Fixed Effects
* Dynamic Programming by Euler Equation Based Policy Function Iteration
* Weak Efficient Market Hypothesis Testing

-------------------------------------
Numerical Methods and Statistics tools
-------------------------------------
* Climb High (A Numerical Nonlinear Optimization Routine)
* Numerical Nash Equilibrium
* Random Numbers from Common Distributions
* Cumulative Distribution Function (CDF) from Common Distributions
* Density Function from Common Distributions
* Universal sampling using inverse CDF, rejection, adaptive rejection, weighed bootstrap
* Numerical derivatives and integration

-------------------------------------
Extra Tools on Economic Teaching and Research
-------------------------------------
* Econ 101 Diagram Generator (Introductory Economics Textbook Style Graphs)
* MATLAB to R Codes Translator
* MATLAB to GAUSS Translator
* Class Attendance Checker
* Grades and Data Transformer

-------------------
Contact information
-------------------
Written by Hang Qian, Dept. of Economics, Iowa State University
Contact me: matlabist@gmail.com
More econometrics routines and pedagogical economics software are available at
http://www.public.iastate.edu/~hqi/

Comments and Ratings (12)

YuZe Zhang

It's really helpful. Thank you very much for sharing :)

YuZe Zhang

It's very useful!Thanks for sharing!Thanks for your assiduous work on code!Best wishes to you and expect more code from you!

Xu Zhang

Hang Qian

Hang Qian (view profile)

Hi Jan,

Thank you very much for your comments. The points you raised are pertinent. Some programs in the toolkit were written years ago when I was learning MATLAB, and were not as computationally efficient as my recent works. I would like to keep the old program as is.

Please only take the useful part and discard the remaining. Reading the perfect codes is not as interesting as discovering some flags where we can improve the program for numerical efficiency and robustness.

Regards,

- Hang Qian

Jan Simon

Jan Simon (view profile)

Lines like these are awkward and bewildering:

eval([char([81 72 49 61]),'[87 114 105 116 116 101 110 32 98 121];'])
eval([char([81 72 50 61]),'[32 72 97 110 103 32 81 105 97 110];'])

This is simply an obfuscation.

Some functions have comments in a foreign language, e.g. LINEAR_INTERP_DELUXE_4. Therefore I cannot estimate if this function does what is wanted.

The function vec.m is a time-consuming way to avoid the simple and efficient "y = x(:)".

The code contains "clear all, warning off", which have severe side effects.

Without doubt this work is impressive. But the can be improved substantially at many places. I cannot vote for it, because I'm working in another field and cannot test if it is useful.

Brad Stiritz

An extremely impressive body of work. Thank you Qian very much for your time and care, and for your generosity in sharing these helpful functions with the community.

The code looks well-organized with good variable names. I would have preferred more low-level comments explaining each step of your calculations. Overall, though, a truly excellent package that's very much appreciated! :)

Thanks!!!!

XiaoYan

It seems extremely helpful. Thanks!

MATLAB Release
MATLAB 7.11 (R2010b)
Acknowledgements

Inspired: StochPV

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

EconToolkit/bayesian/BayEndogneityv1/

EconToolkit/bayesian/BayHPDv1/

EconToolkit/bayesian/BayLinearRegressv1/

EconToolkit/bayesian/BayLogitProbitv1/

EconToolkit/bayesian/BayMarginLikev1/

EconToolkit/bayesian/BayPanelv1/

EconToolkit/bayesian/BayRegimeChangev1/

EconToolkit/bayesian/BayRegressMorev1/

EconToolkit/bayesian/BayRestrictParav1/

EconToolkit/bayesian/BaySURv1/

EconToolkit/bayesian/BayTobitv1/

EconToolkit/bayesian/BayVariableSearchv1/

EconToolkit/bayesian/BayVARv1/

EconToolkit/extras/ClassAttendv1/

EconToolkit/extras/Econ101Diagramv1/01 Utility Function/

EconToolkit/extras/Econ101Diagramv1/02 Consumer Problem/

EconToolkit/extras/Econ101Diagramv1/03 Demand Function/

EconToolkit/extras/Econ101Diagramv1/04 Consumer Welfare/Consumer Surplus/

EconToolkit/extras/Econ101Diagramv1/04 Consumer Welfare/Cost of Living Adjust/

EconToolkit/extras/Econ101Diagramv1/04 Consumer Welfare/Food Stamp/

EconToolkit/extras/Econ101Diagramv1/04 Consumer Welfare/Price Subsidy/

EconToolkit/extras/Econ101Diagramv1/04 Consumer Welfare/Quota/

EconToolkit/extras/Econ101Diagramv1/05 Production/

EconToolkit/extras/Econ101Diagramv1/06 Cost and Profit/

EconToolkit/extras/Econ101Diagramv1/07 Nash Equilibrium/

EconToolkit/extras/Econ101Diagramv1/07 Nash Equilibrium/Examples/

EconToolkit/extras/Econ101Diagramv1/11 Trade PPF/

EconToolkit/extras/Econ101Diagramv1/12 Trade Surplus/

EconToolkit/extras/Econ101Diagramv1/13 Price Ceiling/

EconToolkit/extras/Econ101Diagramv1/14 Real GDP/

EconToolkit/extras/Econ101Diagramv1/15 CPI Inflation/Basic version/

EconToolkit/extras/Econ101Diagramv1/15 CPI Inflation/Deluxe version/

EconToolkit/extras/Econ101Diagramv1/16 Money Creation/

EconToolkit/extras/Econ101Diagramv1/

EconToolkit/extras/GradeTransformv1/

EconToolkit/extras/Matlab2Gaussv1/

EconToolkit/extras/Matlab2Gaussv1/private/

EconToolkit/extras/Matlab2Rv1/

EconToolkit/extras/Matlab2Rv1/private/

EconToolkit/macro/DynamicProgramv1/Robust Algorithm/1 Simple growth model/

EconToolkit/macro/DynamicProgramv1/Robust Algorithm/2 Add labor/

EconToolkit/macro/DynamicProgramv1/Robust Algorithm/3 Add shocks/

EconToolkit/macro/DynamicProgramv1/Robust Algorithm/4 Two country/

EconToolkit/macro/DynamicProgramv1/Utlimate Algorithm/1 Simple growth model/

EconToolkit/macro/DynamicProgramv1/Utlimate Algorithm/2 Add labor/

EconToolkit/macro/DynamicProgramv1/Utlimate Algorithm/3 Add shocks/

EconToolkit/macro/DynamicProgramv1/Utlimate Algorithm/4 Two country/

EconToolkit/macro/EfficientMarketv1/

EconToolkit/macro/GMMv1/

EconToolkit/macro/Panelv1/

EconToolkit/micro/AggregateCovariatev1/

EconToolkit/micro/BayesianMIVv1/

EconToolkit/micro/BootstrapBiasCorrectv1/

EconToolkit/micro/EMv1/ErrorT/

EconToolkit/micro/EMv1/MissData/

EconToolkit/micro/EMv1/Tobit/

EconToolkit/micro/LogitProbitBasev1/

EconToolkit/micro/LogitRUMv1/

EconToolkit/micro/OLSv1/

EconToolkit/micro/Tobitv1/

EconToolkit/numeric/CDF/

EconToolkit/numeric/ClimbHighv1/

EconToolkit/numeric/Density/

EconToolkit/numeric/DiffInt/

EconToolkit/numeric/Nash/

EconToolkit/numeric/Nash/Examples/

EconToolkit/numeric/RandomNumber/

EconToolkit/numeric/SamplingMethod/

EconToolkit/private/