Two Econometrics Toolbox functions, lmtest and waldtest, require you to give derivative estimates or covariance estimates as inputs. How are you supposed to calculate those inputs? This demo shows how to calculate them using the Symbolic Math Toolbox jacobian function for gradients and covariances (via Hessians), and matlabFunction for turning those gradients and covariances into function handles or files.
The demo is similar in some ways to those showing how to use symbolic functions for optimization. The difference is largely that econometrics uses data. The demo shows how to use data as an input for econometrics functions symbolically.
Alan Weiss (2021). Symbolic Derivatives for Econometric Tests (https://www.mathworks.com/matlabcentral/fileexchange/25715-symbolic-derivatives-for-econometric-tests), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Platform CompatibilityWindows macOS Linux
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!